You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(company-os): routine trigger answers 202 when the schedule write failed or Redis is absent #22003
the Redis zadd that schedules the routine sits in try: ... except Exception: pass, so any Redis failure is swallowed, unlogged;
when get_async_redis_client() returns None the zadd is skipped with no error;
both paths fall through to return RoutineTriggerResponse(routine_id=routine_id) with status 202.
The caller cannot tell a scheduled trigger from a dropped one.
Not established
How often either path occurs on a running install (no log line exists to count).
Whether any caller retries on its own.
Proposed fix
One mechanism: the route answers 202 only after the zadd succeeded. A missing client or a failed zadd is logged and answered with 503 through the existing llc error helper. No bare except Exception: pass.
Acceptance criteria
A test with a Redis client whose zadd raises gets 503, not 202, and the failure is logged.
A test with no Redis client (None) gets 503, not 202.
A test with a working client gets 202 and the member is present in the schedule key.
No except Exception: pass remains in trigger_routine.
Note
llc/api/routines.py is touched by open PR #21960; this waits for it (same file, one PR).
Activity