We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18d2e2f commit 077375dCopy full SHA for 077375d
src/app/core/worker/functions.py
@@ -1,5 +1,6 @@
1
import asyncio
2
import logging
3
+from typing import Any
4
5
import structlog
6
import uvloop
@@ -23,11 +24,11 @@ async def shutdown(ctx: Worker) -> None:
23
24
logging.info("Worker end")
25
26
-async def on_job_start(ctx: Worker) -> None:
27
+async def on_job_start(ctx: dict[str, Any]) -> None:
28
structlog.contextvars.bind_contextvars(job_id=ctx["job_id"])
29
logging.info("Job Started")
30
31
-async def on_job_end(ctx: Worker) -> None:
32
+async def on_job_end(ctx: dict[str, Any]) -> None:
33
logging.info("Job Competed")
34
structlog.contextvars.clear_contextvars()
0 commit comments