kue-scheduler icon indicating copy to clipboard operation
kue-scheduler copied to clipboard

Integration with Kue Admin Dashboard

Open KeKs0r opened this issue 8 years ago • 7 comments

Hi,

I am just getting started with this module and wonder how it integrates with normal kue. I saw the "scheduled" jobs once they were queued, but I don't see them while still being delayed e.g. When I schedule a job for running every 5 minutes, I would like to see in the admin UI when the next instance is gonna run (e..g in 3 minutes9

KeKs0r avatar Nov 11 '15 15:11 KeKs0r

@KeKs0r

Currently every jobs have not been integrated with kue ui. Only schedule and once job have been intergrated.

Am open for discussion

lykmapipo avatar Nov 11 '15 17:11 lykmapipo

Okay, how is it not integrated and can it be integrated within kue-scheduler or does it require changes to kue itself?

If you can elaborate slightly on the internals. E.g. did schedule and once need to be manually integrated? If so what needed to be done? Can we do the same for every?

KeKs0r avatar Nov 12 '15 13:11 KeKs0r

@KeKs0r

  • schedule just use kue delay and once just save a job directlty.
  • every uses redis key expiry.
    • first if job is checked if is unique and already schedule
    • then job expiry key is computed
    • then every details are converted using cron or human-interval and next run time is computed.
    • then a delay to use for key expiry is compute as a difference between now and next run time.
    • then job details are saved
    • then a job expiry key is set
    • from there on kue-scheduler keep listen for the job(s) key expiry. once key expiry, if job is unique it just inactive existing job in kue else i create a job and save it. From this point kue handle job lifecycle.

You can look every code i have tried my best to document it.

Hope it helps.

lykmapipo avatar Nov 12 '15 14:11 lykmapipo

But with that approach should not at least the NEXT instance of the job be shown in the admin interface with the normal delay?

KeKs0r avatar Nov 13 '15 12:11 KeKs0r

@KeKs0r

That sound cool. Let me review the codes by this weekend and see what can be done.

:100:

lykmapipo avatar Nov 13 '15 14:11 lykmapipo

@KeKs0r

Can we work on this feature together. I will appreciate a discussion around it.

lykmapipo avatar Nov 26 '15 07:11 lykmapipo

@lykmapipo of course, although as said. I don't know the internals of kue-scheduler that well, and are currently trying to hunt down another bug.

I think the most important thing is to show the next instance of a job. Which I would have assumed would work out of the box.

Also I remove ALL my jobs on complete, so I am not sure if the jobs I schedule as "now" would actually show up in the admin interface and is deleted afterwards or they have not even been there in the first place.

KeKs0r avatar Nov 30 '15 12:11 KeKs0r