Explain why start did nothing when a process is below its quantity - #41
Open
facundofarias wants to merge 1 commit into
Open
facundofarias wants to merge 1 commit into
facundofarias wants to merge 1 commit into
Conversation
Supervisor#start_processes skips any process type that already has running
instances:
next if @processes[process] && !@processes[process].empty?
so a type running 23 of a configured 25 is skipped entirely and `procodile
start <type>` prints:
No processes to start.
while `procodile status` simultaneously reports:
* worker only has 23 instances (should have 25)
Two commands contradicting each other, with no hint that `check_concurrency`
is the one that tops the type up.
Keep the existing behaviour and message, but follow it with the reason and
the remedy when the supervisor is reporting an incorrect quantity for a type
the user asked to start.
The quantity check is advisory: it is wrapped so a failure to read status
cannot turn a successful no-op into an error.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P89F451YDRDBj5br14i3GD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Supervisor#start_processesskips any process type that already has running instances, so a type running 23 of a configured 25 is skipped entirely:Two commands contradicting each other, with nothing pointing at
check_concurrencyas the one that actually tops the type up.Change
Behaviour and the existing message are unchanged. When the supervisor is reporting an incorrect quantity for a type the user asked to start, the reason and remedy follow it:
Notes
statuscall from the CLI — no change to the control protocol or tostart_processes.worker.1) are reduced to their process type before matching.Specs in
spec/specs/cli_spec.rbcover the filtering logic. Full suite green (40 examples).