davechallis / ocypod

Ocypod is a Redis-backed service for orchestrating background jobs. Clients/workers can be written in any language, using HTTP/JSON to queue/fetch jobs, store results, etc.
Apache License 2.0
194 stars 14 forks source link

Job List API #25

Open 18601673727 opened 2 years ago

18601673727 commented 2 years ago

Is there something like this?

GET /jobs?where=status:failed&offset=0&limit=10

Could be very helpful to manage jobs.

davechallis commented 2 years ago

There isn't at the moment, but that's something I'd like to add. Someone else had some good ideas about being able to find jobs by status to be able to manually deal with failed jobs.

At the moment it'd be very inefficient to implement as job data is kept in a flat structure once no longer queued (so e.g. finding all jobs with a given status would need a linear scan through all jobs).

I'm currently working on some changes that should allow this, just very busy with end of year work, but making some progress.