fn drone_trigger(
state: &AppState,
job: &CronJob,
run_id: &str,
) -> Result<Value, String>Expand description
What a job hands the drone it runs, read as {{trigger.*}}: how the run
started (schedule, manual, retry, event), the job, and the slot it was due.
For an event’s run it is the event’s own fields (jobs::RunLedger::event_input) with those keys set on top, so a
source’s field never stands in for kind, job, run_id or fired_at_ms. The event’s data is kept with the run
(db_job_event_inputs) from the fire to here, through a delay, a wait for its turn, a retry and a restart. A run
whose data is no longer there (it aged out, or could not be read) fails saying so, not running on an empty input.