View Source Lightning.Janitor (Lightning v2.10.4)
The Janitor is responsible for detecting runs that have been "lost" due to communication issues with the worker.
Every X minutes the Janitor will check to ensure that no runs have been running for more than Y seconds.
Configure your maximum run runtime with a WORKER_MAX_RUN_DURATION_SECONDS environment variable; the grace period will be an additional 20%.
Summary
Functions
The find_and_update_lost function determines the current time, finds all runs that were claimed before the earliest allowable claim time for unfinished runs, and marks them as lost.
The perform function takes an %Oban.Job
, allowing this module to be invoked
by the Oban cron plugin.
Functions
The find_and_update_lost function determines the current time, finds all runs that were claimed before the earliest allowable claim time for unfinished runs, and marks them as lost.
The perform function takes an %Oban.Job
, allowing this module to be invoked
by the Oban cron plugin.