cryo28 / sidekiq_status

Extension to Sidekiq to pass job execution metadata such as status and result back to the client
MIT License
152 stars 53 forks source link

Get jobs based on a attribute/metadata? #27

Closed StephenOTT closed 10 years ago

StephenOTT commented 10 years ago

Not 100% sure this is the right extension but can sidekiq_status but used to store job attributes/metadata such as a "username" and then use sidekiq_status to query for all jobs "assigned" to that "username"?

Thanks

cryo28 commented 10 years ago

This is not possible per se because sidekiq_status stores all job metadata serialized together in one key. So querying by a particular attribute would be quite inefficient.

So the efficient solution is to use some other redis data structures. But this requires the code tailored for particular use cases. Generally, it should not be hard to do on top of sidekiq_status, but it will require to create a fork and modify the code as there is no API providing any hooks for such an extension currently available in sidekiq_status.

StephenOTT commented 10 years ago

Thanks for the reply!

I have moved onto https://github.com/seomoz/qless as it supports "Tags" and has a really nice feature set.