Answer the question
In order to leave comments, you need to log in
How to properly use a queue in Redis?
How to properly use a queue in Redis? If everything is on one server.
I use yii2 https://github.com/yiisoft/yii2-queue
Do I need to create a separate connection (to radish) for each task?
Or is it possible to put all types of tasks in one queue? What is more correct?
For example, if there are tasks:
- Uploading images
- Updating by api information
Answer the question
In order to leave comments, you need to log in
You can put in one queue, if there is no understanding why divide into several.
In the future, when you need to divide, this will generally not be difficult.
And it’s worth sharing so that: you can monitor the operation of queues, turn off individual queues, manage the number of workers per queue. On small projects it can be redundant.
UPD:
You need to add heavy tasks to the queue, such as processing pictures. It doesn't look like a queue is needed to update the API information. Rather, optimization is needed if it takes a long time. Depends on the situation
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question