Status page shows Spoolman's new place and rest right after a write
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014GcEk5tkfFSYD6NTF66NkC
This commit is contained in:
1 parent
64ea91d107
commit
87c5decc1c
1 file changed
+2
@@ -617,6 +617,7 @@ class PrinterWorker:
|
||||
b["remaining"] = target
|
||||
b["pending"] = None
|
||||
b["last"] = {"time": self.bridge.clock(), "grams": round(grams, 3), "details": details.removeprefix(" – ")}
|
||||
self.bridge.spool_cache.pop(b.get("spoolman"), None) # show Spoolman's new rest at once
|
||||
if log_time is not None:
|
||||
b["log_time"] = max(b.get("log_time") or 0.0, log_time)
|
||||
self.bridge.state.save()
|
||||
@@ -1182,6 +1183,7 @@ class Bridge:
|
||||
continue
|
||||
if done:
|
||||
applied[str(sid)] = t
|
||||
self.spool_cache.pop(sid, None) # the status page shows the new place at once
|
||||
if t["location"] != storage["location"]:
|
||||
written = set(self.state.data["written_locations"]) | {t["location"]}
|
||||
self.state.data["written_locations"] = sorted(written)
|
||||
|
||||
Reference in new issue
Block a user