File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ def get_status(
26
26
try :
27
27
if task .status == "FAILURE" :
28
28
# *FAILURE* The task raised an exception, or has exceeded the retry limit.
29
- # The :attr:`result` attribute then contains the exception raised by the task.
29
+ # The :attr:`result` attribute then contains the exception raised by
30
+ # the task.
30
31
# https://docs.celeryq.dev/en/stable/_modules/celery/result.html#AsyncResult
31
32
raise task .result
32
33
Original file line number Diff line number Diff line change 10
10
async def logging_middleware (request : Request , call_next ):
11
11
try :
12
12
response = await call_next (request )
13
- # TODO: use Origin to have summary prometheus metrics on where requests come from
13
+ # TODO: use Origin to have summary prometheus metrics on where
14
+ # requests come from
14
15
# origin = request.headers.get("origin")
15
16
logger .info (
16
17
f"{ request .client .host } :{ request .client .port } { request .method } { request .url ._url } - HTTP { response .status_code } "
@@ -25,7 +26,9 @@ async def logging_middleware(request: Request, call_next):
25
26
raise e
26
27
27
28
28
- async def increase_exceptions_counter (e : Exception , location : str = "cronjob" ):
29
+ async def increase_exceptions_counter (
30
+ e : Exception , location : str = "cronjob"
31
+ ) -> None :
29
32
if location == "cronjob" :
30
33
try :
31
34
last_trace = traceback .extract_tb (e .__traceback__ )[- 1 ]
You can’t perform that action at this time.
0 commit comments