Skip to content

Suggest check_concurrency when status reports an incorrect quantity - #40

Open
facundofarias wants to merge 1 commit into
adamcooke:masterfrom
deployhq:status-suggests-check-concurrency
Open

facundofarias wants to merge 1 commit into
adamcooke:masterfrom
deployhq:status-suggests-check-concurrency

Conversation

@facundofarias

Copy link
Copy Markdown

Problem

procodile status tells you when a process type is below its configured quantity:

 * worker only has 23 instances (should have 25)

but not what to do about it. The remedy is procodile check_concurrency, which is easy to miss — procodile start worker looks like the obvious candidate, but it is a no-op here, because Supervisor#start_processes skips any type that already has running instances:

next if @processes[process] && !@processes[process].empty?  # Process type already running

We hit this on a production host that had been sitting at 23/25 workers for weeks. The warning was visible in status the whole time; nobody acted on it because it didn't say what would fix it, and the command people reached for did nothing.

Change

Print a follow-up line naming the command whenever an incorrect_quantity message is present:

 * worker only has 23 instances (should have 25)
   Run `procodile check_concurrency` to start the missing process(es).

Notes

Added to StatusCLIOutput rather than Message.parse deliberately — Message.parse also backs procodile status --simple, whose one-line output is typically consumed by monitoring and should stay terse. --simple is unchanged.

Specs added in spec/specs/status_cli_output_spec.rb covering the quantity case, the non-quantity case, no messages, and mixed messages. Full suite green (39 examples).

`procodile status` reports when a process type is below its configured
quantity:

    * worker only has 23 instances (should have 25)

but does not say how to fix it. The remedy is `procodile check_concurrency`,
which is easy to miss: `procodile start <type>` looks like the obvious
candidate but is a no-op here, because start_processes skips any type that
already has running instances.

Print a follow-up line naming the command whenever an incorrect_quantity
message is present.

This is deliberately added to StatusCLIOutput rather than Message.parse,
because Message.parse also backs `procodile status --simple`, whose one-line
output is typically consumed by monitoring and should stay terse.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P89F451YDRDBj5br14i3GD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant