diff --git a/src/monitor_utils/runner.py b/src/monitor_utils/runner.py index c334400..89487d7 100644 --- a/src/monitor_utils/runner.py +++ b/src/monitor_utils/runner.py @@ -213,6 +213,11 @@ async def execute_monitor_logic( proxies: Proxies applied to the session. headers: Headers applied to the session. cookies: Cookies applied to the base session; ignored for TLS. + pre_task_func: Optional awaitable run once per cycle, awaited before any + category tasks are dispatched and receiving session and **kwargs. + Use it for setup the category tasks depend on (session headers, + cookies, fetched state); if it raises an expected task error the + cycle is skipped and retried after the usual delay. concurrent_pre_task_func: Optional awaitable run once per cycle, gathered alongside the category tasks and receiving session and **kwargs. Category tasks must not depend on its side effects (session