jhuckaby / Cronicle

A simple, distributed task scheduler and runner with a web based UI.
http://cronicle.net
Other
3.66k stars 381 forks source link

queued jobs without job-id #136

Open kh2901 opened 5 years ago

kh2901 commented 5 years ago

Summary

Currently we are using the api call run_event. Event concurrency is disabled and we allow jobs to queue.

image

Our problem ocurred when we want to start a second job. The response of run_event api call doesn't include the jobid. {'code': 0, 'ids': [], 'queue': 1} The missing jobid behavior affects our process because we do not know the status of the current job.

Does the event already have a jobid at this point? If so, would it be possible to query this jobid via api?

Best Regards Konstantin

jhuckaby commented 5 years ago

Hello there! I do apologize, but the way the event queue system was implemented is that jobs aren't assigned an ID until they actually run.

I will try to figure out how to handle this in a future release. I am not sure how it will work yet, because queued jobs aren't really in the system yet, but I'll think of something.

Thanks for the issue report.