resque / resque/resque-scheduler

enqueue_delayed_selection doesn't seem to work

Open
#669 1 comment 2 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

find_delayed_selection works, but not the enqueue function. The jobs remain queued up. Here's what I was trying to do:

result = Resque.find_delayed_selection { |args| args[0]['job_id'] == self.showing_meta.autocancel_job_id }
ap result
# => [
    [0] "{\"class\":\"ActiveJob::QueueAdapters::ResqueAdapter::JobWrapper\",\"args\":[{\"job_class\":\"AdvanceShowingJob\",\"job_id\":\"3bfce2cd-ec38-49bc-a875-f3c5b03a1060\",\"provider_job_id\":null,\"queue_name\":\"default\",\"priority\":null,\"arguments\":[{\"_aj_globalid\":\"gid://schedulerapi/Showing/39\"},\"e_autocancel!\"],\"executions\":0,\"locale\":\"en\"}],\"queue\":\"default\"}"
]
result = Resque.enqueue_delayed_selection { |args| args[0]['job_id'] == self.showing_meta.autocancel_job_id }
ap result
# => 0

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

Start with the Resque.find_delayed_selection and Resque.enqueue_delayed_selection entry points, then reproduce the example using the shown job_id predicate. Compare the selected jobs with the enqueue result, and consider the issue done when matching delayed jobs are enqueued and coverage verifies the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
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.