Skip to main content

DEFAULT_COMPLETION_GRACE

Constant DEFAULT_COMPLETION_GRACE 

Source
pub const DEFAULT_COMPLETION_GRACE: Duration;
Expand description

How long in-flight tasks get, once shutdown is signalled, to finish on their own before they are cancelled.

Five seconds covers the blocking sends and short streams that make up most traffic, so a rolling deploy lets them finish instead of stopping them; a turn still running after it ends Failed, failure class transient (or, when its executor can be re-run on a store with claims, is handed back to its caller, ADR 0054). It is deliberately short: work that is still running after it is usually a long delegation, which no window short of the platform’s kill deadline would see finish, and which needs the time that follows — DEFAULT_TASK_GRACE — to cancel what it delegated. Zero cancels at once.