LemonRouter.RunProcess.Watchdog (lemon_router v0.1.0)

View Source

Idle-run watchdog timer logic for RunProcess.

Manages scheduling, touching, and cancelling the per-run idle watchdog timer, as well as the interactive keepalive confirmation flow for Telegram sessions.

Summary

Functions

cancel_run_watchdog(state)

@spec cancel_run_watchdog(map()) :: map()

cancel_run_watchdog_confirmation(state)

@spec cancel_run_watchdog_confirmation(map()) :: map()

clear_watchdog_confirmation(state)

@spec clear_watchdog_confirmation(map()) :: map()

fail_run_for_idle_timeout(state)

@spec fail_run_for_idle_timeout(map()) :: map()

fail_run_for_user_cancel(state)

@spec fail_run_for_user_cancel(map()) :: map()

maybe_request_watchdog_confirmation(state)

@spec maybe_request_watchdog_confirmation(map()) :: {:ok, map()} | :error

resolve_run_watchdog_confirm_timeout_ms(opts)

@spec resolve_run_watchdog_confirm_timeout_ms(keyword()) :: pos_integer()

resolve_run_watchdog_timeout_ms(opts)

@spec resolve_run_watchdog_timeout_ms(keyword()) :: pos_integer() | nil

schedule_run_watchdog(state)

@spec schedule_run_watchdog(map()) :: map()

touch_run_watchdog(state)

@spec touch_run_watchdog(map()) :: map()

touch_run_watchdog_activity(state)

@spec touch_run_watchdog_activity(map()) :: map()