Skip to content

Commit ca0b22a

Browse files
committed
fix: log instead of silently passing on failed-dispatch cleanup
Addresses the code-quality lint on the best-effort hash delete in dispatch_invocation's failure path: replace the bare `except: pass` with a logger.debug carrying the invocation_id. No behavior change — cleanup stays best-effort and still returns a failed Invocation.
1 parent 7921781 commit ca0b22a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

application/devices/broker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ def dispatch_invocation(
297297
try:
298298
redis.delete(_inv_key(invocation_id))
299299
except Exception:
300-
pass
300+
logger.debug(
301+
"cleanup after failed dispatch failed for %s", invocation_id
302+
)
301303
inv.error = "device broker dispatch failed"
302304
inv.completed = True
303305
return inv

0 commit comments

Comments
 (0)