Split pending-worker checks out of task status polling - #120
Merged
Conversation
`_check_pending_workers` ran inside the Slurm branch of `_check_task_status`, coupling queue-warning bookkeeping to status polling. It now owns its task loop and runs as its own tracking-cycle step. That also stops the warnings during shutdown: `_drain_tasks` polls status in a loop, so it used to query the queue every second and could log pending warnings while tasks were still exiting. Rename `_handle_task_timeout` to `_resubmit_if_timed_out` and move its ordering constraint into its own docstring, next to the code that depends on it. Drop the status-polling mocks the pending-worker tests only needed to reach the check through `_check_task_status`, and add a cycle-level test so the new step cannot be dropped from `_run_tracking_cycle` unnoticed.
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.
Summary
_check_task_statusinto its own_check_pending_workersstep in the tracking cycle, which stops warning about pending workers during shutdown_handle_task_timeoutto_resubmit_if_timed_out, since the name should say it resubmitstest_tracking_cycle_checks_pending_workersso dropping the new step from_run_tracking_cyclefails a test rather than silently disabling the warning