Open lpoulin opened 1 month ago
I would be happy to work on this btw, sounds fun!
Go for it :)
@felixmosh what are your thoughts about where to have it in the UI? Originally I was thinking to have 'Scheduled' as another status but it's not really a job 'status', so I was thinking about making it a modal that could be opened from the dropdown below 'add job'. My only hesitation there is that it is kind of hidden.
Can u explain what is new with the new approach?
Check out the docs of job schedulers here. Basically, you can add something called a job scheduler to a queue that contains a pattern/interval for putting new jobs on the queue. You can also add job templates with a scheduler that will ensure that all jobs produced by that scheduler inherit the settings.
My idea is that we can have a way to display the job schedulers that exist for the selected queue. From there, we could edit/delete them. It would also be nice to be able to add job schedulers from the UI.
A job scheduler is a thing that produces jobs, not a job itself. But, like jobs, they are something that are added and exist on a queue.
Now I'm thinking it may make sense to display a button in the header actions (iff a queue is selected) to open the scheduler management modal, or perhaps it could even be its own page
Ha, cool feature, it should go under queue actions (the place where we have Add Job
)
I think that it should apear as a new modal, with that upsertScheduler
props.
Pay attension to the fact that this should be added only on bullmq queues (we have a flag for that)
A place to manage jobSchedulers should be in a new Page, which will allow to list them & remove
Makes sense, thanks for the feedback. So add 'Add Job Scheduler' under queue actions for adding them, and a new page for listing/managing. How should the user navigate to said page?
Maybe we should add a link at the right of queue statuses (before 3 dots of queue actions)?
There isn't a whole lot of room up there (at my current resolution the statuses go all the way to the queue actions) and if we have to start scrolling it would be hidden. I'm going to add it as a queue action for now and we can iterate.
Also, could you please point out where the library flag is in the UI so it can be displayed conditionally? Not having luck finding it @felixmosh
As of bullmq@5.16.0,
jobSchedulers
are the recommended way to manage scheduled jobs that run on an interval. It would be awesome if these could be managed (added, removed, changed) via the dashboard.