Queues are handy for processing items in the background, you just send an item to the queue and have a worker in the background to do something with it and remove it from the queue. You can even have multiple workers running
Flybase is great for setting up queues, but we wanted to make it even better (and simpler) so we built our Queue system.
Adding items to a queue is simple, you just have to use the
Then to get items out of a queue, you just
getLength function returns a count of pending tasks in your queue, Then the
dequeue function returns the next item in your queue. If there are no pending jobs, then it just performs another check to see.
You could run the worker portion of your tasks in a backend node.js app, while the enqueue portion can be handled from anywhere, even direct from the browser.
You can also use our REST API to
Will return the next item in the queue.
Will return the number of pending jobs currently in the queue.
will store a new task to our queue for your Flybase app called
There are various ways you can use the queue system, and we’ve kept it as simple as possible on purpose, we don’t want to overcomplicate something as simple as queues.
Ready To Build Awesome Apps?