mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-16 05:55:09 +00:00
perf(api)!: cut per-request and per-tick event bus traffic
Session update events carry the new action as action_entry instead of the full log; access lines stay out of the log ring unless --debug. Job events build and redact their dict once, the progress interval matches the 0.5 s poll, and dashboard stats are serialized once.
This commit is contained in:
@@ -183,7 +183,9 @@ async def test_session_action_log() -> None:
|
||||
store.record_action(entry.session_id, {"action": "titles", "status": 200})
|
||||
store.record_action("missing", {"action": "titles", "status": 200})
|
||||
assert entry.summary()["actions"] == [{"action": "titles", "status": 200}]
|
||||
assert queue.get_nowait()["data"]["action"] == "update" and queue.empty()
|
||||
event = queue.get_nowait()["data"]
|
||||
assert event["action"] == "update" and queue.empty()
|
||||
assert event["action_entry"] == {"action": "titles", "status": 200} and "actions" not in event
|
||||
finally:
|
||||
bus.unsubscribe(queue)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user