feat(ipc): allow configuring job entrypoint shutdown grace period (#6512) - #6674
Open
piyushrajyadav wants to merge 1 commit into
Open
feat(ipc): allow configuring job entrypoint shutdown grace period (#6512)#6674piyushrajyadav wants to merge 1 commit into
piyushrajyadav wants to merge 1 commit into
Conversation
piyushrajyadav
force-pushed
the
fix/entrypoint-shutdown-timeout
branch
from
August 3, 2026 10:01
f962ea2 to
4e88da7
Compare
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.
Fixes #6512
Summary
When a worker process shuts down,
_JobProccurrently waits for the job entrypoint task for a hard-coded 15 seconds before cancelling it. Some applications need shutdown to terminate an active call immediately (e.g.entrypoint_shutdown_timeout=0.0) rather than allow voice playout or entrypoint tasks to drain for the full 15-second grace period.This PR adds an
entrypoint_shutdown_timeout: float = 15.0parameter toServerOptionsandAgentServer, passing it down throughProcPool,ProcJobExecutor,ThreadJobExecutor,ProcStartArgs,ThreadStartArgs, to_JobProc.Changes Made
entrypoint_shutdown_timeouttoServerOptionsandAgentServer.__init__, passed down infrom_server_optionsandrun().entrypoint_shutdown_timeouttoProcPool.__init__, passed down to job executors.entrypoint_shutdown_timeoutthrough process startup args.entrypoint_shutdown_timeoutthrough thread startup args.timeout=15in_JobProc._run_job_task()withself._entrypoint_shutdown_timeout.Test Plan
python -m pytest tests/test_entrypoint_shutdown_timeout.py --unit(2 passed)ruff check&ruff format