F
F
flyte2020-11-05 18:03:52
MongoDB
flyte, 2020-11-05 18:03:52

Creating a global function execution queue on nodejs (expressjs/mongo)?

Good day! Help plz with this problem.
I am developing an application on the express/mongo stack. There is a function for generating images, I want to make a global queue so that more than 100 items for all users cannot be generated at the same time, how is it better to implement this? It is desirable that this works in conjunction with mongo, so that you can administer the queue from under the UI.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
flyte, 2020-11-09
@flyte

In general, I implemented it using db.collection.watch() and the p-queue package. Thanks to all))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question