resque / resque/resque-pool

Should quit_excess_workers_for() respect TERM_CHILD setting?

Open
#172 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Is it necessary to send a different signal in quit_excess_workers_for when TERM_CHILD=1 is set to ensure clean shutdown of workers under Heroku signal handling conditions? Currently it always sends QUIT

    def quit_excess_workers_for(queues)
      delta = -worker_delta_for(queues)
      pids_for(queues)[0...delta].each do |pid|
        Process.kill("QUIT", pid)
      end
    end

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

The entry point is quit_excess_workers_for, which currently sends QUIT to selected worker PIDs. Start by tracing how TERM_CHILD is handled in the worker shutdown path and compare that with Heroku signal-handling conditions; done means the expected signal behavior is established and verified.

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.