Skip to main content

run_watcher

Function run_watcher 

Source
pub async fn run_watcher(
    hosts: &WatcherHosts,
    setup: &WorkerSetup,
    process: &ProcessSpec,
    task: PythonTask,
    limits: Limits,
    stop: Stops,
    spawned: impl FnOnce(i32),
) -> Result<Ran, LaunchError>
Expand description

Runs a wait step in its code set’s host: spawned gets the host’s process ID. Cancelling, a timeout and a drain cancel its coroutine; one that doesn’t end in its grace time has its whole host killed, as Python can’t cancel what doesn’t yield.

§Errors

LaunchError if the host can’t be started or its log can’t be opened.