on_finished
on_finished() is a batch-level lifecycle hook that fires after all workers complete a job iteration, before the interval sleep. No ctx parameter, operates on shared globals accumulated during the batch.
Signature
Section titled “Signature”function on_finished() -> voidParameters
Section titled “Parameters”None.
Returns
Section titled “Returns”None.
Example
Section titled “Example”function on_finished() log("All workers done, sleeping until next interval") _G.batch_stats = nil -- clear accumulated stateendSee Also
Section titled “See Also”- Lifecycle - Full lifecycle documentation
- Multi-Worker - Multi-worker concurrency details