resque / resque/resque-pool

start without running queues throws error

Open
#25 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Ruby
Stars
456
Forks
149
Avg merge
9d 7h
Merged PRs (30d)
3

Description

When starting for the first time without running workers an error is thrown and stops the whole pool from running:

bundle exec resque-pool
=> calls reaper

gems/resque-pool-0.2.0/lib/resque/pool.rb:243:in `reap_all_workers': You have a nil object when you didn't expect it! (NoMethodError)
The error occurred while evaluating nil.queues

Possible solution, add 'if worker' to reaper message:

log "Reaped resque worker[#{status.pid}] (status: #{status.exitstatus}) queues: #{worker.queues.join(",")}" if worker

I am not sure, but i think last week i had it running local without this error. maybe it is the startup time of the workers which prevents the reaper from seeing them.

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 lib/resque/pool.rb around reap_all_workers at line 243 and reproduce the failure with bundle exec resque-pool while no workers are running. Trace how the reaper handles a missing worker and verify that starting the pool no longer raises the nil.queues error or stops the pool.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.