Conversation
|
Hey Boaz, I think it is a good idea to implement a queue, I am also maintaining another plugin which could also use a queue, maybe we could make a separate queue plugin which this and other plugins could use? |
|
Yeah, that crossed my mind too. I'm all for it! |
not finished yet? |
|
Sadly I haven't found the time to continue this feature. I think its still something that could be very helpful for the Strapi ecosystem. |
Maybe asking for some help on Discord... |
|
Would you like to take the lead on this project? I got my hands full working on the core features of Webrools. |
|
@boazpoolman is #14 related to this issue: #150? |
Queue documentation
To solve #14 we need queueing. This PR is a setup for a queue system. Here some docs:
Create queue
To create a queue you have to call the
createservice which takes one parameter that is a string that is unique to your queue. We refer to this as the name of the queue.Add jobs
Once you have created your queue you have to add jobs to it. You can do that by calling the
addJobservice which takes two parameters. The first being the name of the queue, and the second being the data of the job.Process queue
After creating your queue and adding your jobs you have to process the queue. You can do that by calling the
processservice which takes two parameters. The first being the name of the queue, the second is a function that will be called to process a single job.