resque / resque/resque-scheduler
Resque.enqueue_at accepts ActiveRecord::Duration without erroring
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.7k
- Forks
- 477
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
Resque.enqueue_in and Resque.enqueue_at are very similar, and I've seen bugs where an ActiveRecord::Duration is passed to Resque.enqueue_at accidentally. However, no error happens.
My suggestion is to add validation that ensures that Resque.enqueue_at requires a full timestamp and not just a ActiveRecord::Duration, and likewise that Resque.enqueue_in only takes a duration and not a full timestamp.
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
Locate the implementations of Resque.enqueue_at and Resque.enqueue_in and read their existing argument handling. Add validation so enqueue_at rejects ActiveRecord::Duration values and enqueue_in rejects full timestamps, then verify both invalid-input cases and the existing valid behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100