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
{{ message }}
Repository navigation
[feat] removal of one time jobs after worker completes #106
there is the following example: // runs./jobs/worker-8.jsat midnight (once) { name: 'worker-8', timeout: 'at 12:00 am' },
in my usecase i am running a job every 30 minutes that queries an api and dynamically adds jobs to be executed once.
My question is what happenes to the jobs in the queue after they are executed. Will finished jobs be cleared out automatically or will that cause the queue to get huge containing tons of old finished jobs?
The worker will delete when the job has finished but the job will not be removed from the queue.
I do not know what your setup is but it is best practice to have jobs be as standard as possible and use a DB to facilitate the data for the job.
For dynamically added jobs you could add a listener to bree for worker deleted and delete the job upon completion of the worker. Another alternative could be to add a listener to the worker, this way you could also see the process code and respond accordingly.
might be good to have a config option for removal of one-time jobs after a certain amount of time or just have an option on the job to remove after completion.
Activity
shadowgate15 commentedon Jun 2, 2021
The worker will delete when the job has finished but the job will not be removed from the queue.
I do not know what your setup is but it is best practice to have jobs be as standard as possible and use a DB to facilitate the data for the job.
For dynamically added jobs you could add a listener to bree for
worker deletedand delete the job upon completion of the worker. Another alternative could be to add a listener to the worker, this way you could also see the process code and respond accordingly.shadowgate15 commentedon Jul 10, 2021
might be good to have a config option for removal of one-time jobs after a certain amount of time or just have an option on the job to remove after completion.
[-]question about one-time jobs[/-][+][feat] removal of one time jobs after worker completes[/+]