Check on job status (by uuid)
Closed this issue · 4 comments
Hi.
Is there any way I could check on a job's status by UUID? I would like to wait until it is finished or at least poll whether it is already done. Is this possible somehow or easy to integrate?
Thank you in advance!
It's not built in atm, but there are a couple of ways you could do this:
-
Have your job insert a record when it's done. Then you can just check for the existence of that record.
-
Query the
mq_msgs
table to see if the row still exists - if it does, the job is not done. This has the downside that you'll be relying on implementation details of this crate though.
Thanks, did you think of it like that? (Option 2)
This has the downside that you'll be relying on implementation details of this crate though.
Would be good to have in the library then :)
Thanks, yes, I have seen that. I had it before, but it has issues:
- Needs to be manually created and managed. Every job has to do this at job completion.
- Can cause flaws if it is not executed at the same time as job completion.
- Doesn't work if the job is executed after application-restart.
It is more like a manual workaround and I currently don't need it in production code, just testing.