-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Changed some conditionals to assertions to simplify code - Locking around start and end of the agent life (`_agent_life_change_lock`) - free resources is async so it can use `_agent_life_change_lock` - Ops are bound to driver in prepare_send (`driver._prepared_sends`), was too early in agent_start - Fix #6613 `_agent_start_delay` is local to op - Fix #6572 added more logging, fixed some messages, and normalized others - `websocket_ready_timeout` handled correctly. `_agent_receive_alive` calls `_websocket_ready_timeout_cancel` instead of `_agent_starting_done`, which has been removed. This was causing `idle_timeout` to be canceled and restarted, when `idle_timeout` should only be started once the agent is ready. - Cleaned up some naming (opId > op_id when not in msg) - Cascade exceptions into op.internal_error for better logging - Improved error handling/logging in sirepo.status - Replaced Awaited exception with enum return job_supervisor.SlotAllocStatus. - Changed `job_driver._slots_ready` to allocate all required slots instead of returning after first await. Slots are not deallocated so we do not have to validate them after each retry. The only place they are freed is in `destroy_op` which raises CancelTask, bypassing all that logic. - Removed MAX_RETRIES, because unnecessary after `_slots_ready` simplification. There is a single retry in `job_driver.prepare_send` to check `_agent_ready` if `_slots_ready` returns `HAD_TO_AWAIT`. The purpose of the Awaited exception was simply to ensure the agent is ready before `send` is called. The code is now much simpler and accomplishes the same thing. - refactored some asserts to be AssertionError
- Loading branch information
Showing
8 changed files
with
339 additions
and
283 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.