Resque meta data
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 9.5k
- Forks
- 1.7k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 25
Description
I wanted to know how long Resque jobs sit in the queue before getting passed to a worker. This was surprisingly easy to add due the flexibility in Resque.push and Resque::Job. I almost filed a pull request when I ran into one issue.
This would remove the ability of Resque::Job.destroy to destroy a job without scanning through every entry. It didn't look like this functionality is used anywhere though, so I didn't want to spend a bunch of time preparing a pull request.
I put our patch on Gist, and it's currently running production.
I tried to make this ugly patch a well-behaving Resque plugin, but ran into another slight snag. Resque hooks yield the list of job arguments. It makes more sense to me to yield the Resque::Job instances themselves if possible. This way I could access the #queued_at property, or any other meta data I feel like adding. Internally, we're talking about adding a few other bits of metadata, like the user_id or IP of the request that queued the job.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Resque.push and Resque::Job in lib/resque/job.rb, including the destroy implementation and hook behavior referenced in the issue. Review the linked Gist and existing discussion before deciding how queued_at and other metadata should be exposed while preserving job destruction behavior. Done means the metadata and hook API requirements are agreed and covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100