J
J
jenya77712019-07-19 12:54:29
Node.js
jenya7771, 2019-07-19 12:54:29

How to control running NodeJs functions?

Hello, there is an array of objects in the radish that is constantly changing, and in accordance with the objects, the functions should be running, and constantly working. If an object appeared in the array, then you need to run the function, if you removed the object from the radish, then you need to kill the function.
Tell me how you can implement this, and that everything would work stably?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-07-19
@inoise

Use PubSub in Redis. Or take a more adequate RabbitMQ for this and not torment Redis)

A
Alexey Ukolov, 2017-10-26
@VanyaCrazy

Arrays are created like this:

var bodyParts = ['нос' , 'рука' , 'голова'];
var adjectives = ['вонючая' , 'неприятная' , 'унылая'];
var animals = ['Выдра' , 'обезьяна' , 'зебра'];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question