fix(subscriber): disk fallback reads status.json's status, not the dict
read_logged_status() returns the status.json dict; _check_disk_fallback compared that dict with the terminal status strings, so a terminal status recorded only in the audit log was never recognised (Issue #57, comment 5). The dispatch-token and attempt checks are unchanged. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
cbd87734c2
commit
a159a790df
2 files changed
+98
-2
No files matched your search
@@ -92,10 +92,14 @@ def _check_disk_fallback(
|
||||
except Exception:
|
||||
job_rec = {}
|
||||
if not disk_status or disk_status not in ("completed", "error", "cancelled"):
|
||||
# read_logged_status returns the status.json dict; the status is its
|
||||
# "status" field (Issue #57, comment 5: comparing the dict matched nothing).
|
||||
try:
|
||||
disk_status = mqtt_common.read_logged_status(jid, mqtt_common.get_logs_dir(registry_dir))
|
||||
logged = mqtt_common.read_logged_status(jid, mqtt_common.get_logs_dir(registry_dir))
|
||||
except Exception:
|
||||
pass
|
||||
logged = None
|
||||
if logged:
|
||||
disk_status = logged.get("status")
|
||||
|
||||
if disk_status in ("completed", "error", "cancelled"):
|
||||
if expected_dispatch_tokens:
|
||||
|
||||
Reference in new issue
Block a user