resque / resque/resque-scheduler

Resque.enqueue_at accepts ActiveRecord::Duration without erroring

Open
#604 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.