quebert
quebert copied to clipboard
Allow for querying the status of a job
It would be nice to be able to get the status of a quebert job. I would expect to be able to tell if a job is not started, in progress, finished, or ran into an error. (Adding the ability to return a percentage done would also be nice, but maybe a separate feature request.)
I'd like to replicate resque-status, where jobs update their own status. A blocker seems to be that Quebert jobs don't have access to their unique ID, and jobs cannot be looked up by ID.
If you are returning the status, it might also be nice to have some output for a finished job. For example, a job that creates a resources could output an identifier for that resource (such as a database primary key).
Of course, you need somewhere to persist this state information, and somewhere to clean up this information. You don't want to keep around a bunch of "job finished" data forever.
This has been partially implemented at Poll Everywhere as WithJobStatus
. It's dependent on Redis so some effort will be needed to port it to Quebert.