on_finally
on_finally(ctx) runs after every scrape cycle, regardless of success or failure. Defined in defer.lua.
Signature
Section titled “Signature”function on_finally(ctx) -> voidParameters
Section titled “Parameters”| Field | Type | Description |
|---|---|---|
ctx |
table | The cycle context table |
Returns
Section titled “Returns”None.
Example
Section titled “Example”function on_finally(ctx) log("Cycle finished, cleaning up") _G.temp_data = nilendSee Also
Section titled “See Also”- on_success - Called when cycle succeeds
- on_error - Called when cycle fails