You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using this job system since a while and i recently discovered one bug that occurs when the app restarts while an elements its been processing.
If the queue starts with some element 'locked' it keeps the last one without processing it until restat.
Steps to reproduce
Create a Simple queue in which every element takes a decent time to process
Add elements to the queue
Stop the script while processing one item
The element is now in the database with a lock value
Start the application again and wait for all tasks to complete.
Result
The last added item is still in the queue.
Even if you add some element (without restarting) the queue always keep the last element
Expected Result
All elements to be processed.
Aditional Data
In order to reproduce this the queue needs to be persisted. I have been using the postgresql store.
Workaround
Remove the values of 'lock' field before initializing the queue.
The text was updated successfully, but these errors were encountered:
I encountered the same bug while using my own local store following the better-queue-memory example. When restarting the app, the last item in queue will be stuck and not be processed. @thorin8k do you have more details about what I can do to work around this bug ?
I encountered the same bug while using my own local store following the better-queue-memory example. When restarting the app, the last item in queue will be stuck and not be processed. @thorin8k do you have more details about what I can do to work around this bug ?
I was using better-queue with postgreSQL so my workaround was to empty the field 'lock' after every start. With this i ensured that any pending job gets reprocessed after the app starts.
Finally, as the app was getting bigger, we moved from better-queue to RabbitMQ so i haven't any additional info regarding the issue, sorry.
I have been using this job system since a while and i recently discovered one bug that occurs when the app restarts while an elements its been processing.
If the queue starts with some element 'locked' it keeps the last one without processing it until restat.
Steps to reproduce
Result
Even if you add some element (without restarting) the queue always keep the last element
Expected Result
Aditional Data
In order to reproduce this the queue needs to be persisted. I have been using the postgresql store.
Workaround
Remove the values of 'lock' field before initializing the queue.
The text was updated successfully, but these errors were encountered: