fix: enforce SCADA chart device coverage

This commit is contained in:
2026-11-12 10:38:55 +08:00
parent b853b61a0b
commit 2e8fe86f3f
17 changed files with 1220 additions and 13 deletions
@@ -57,6 +57,7 @@ class TaskRepository:
self.plans = []
self.reports = []
self.progress = {}
self.scada_presentations = {}
self.notifications = []
self.locks = []
self.access_requests = {}
@@ -104,6 +105,12 @@ class TaskRepository:
async def get_latest_progress(self, task_id, generation):
return self.progress.get((task_id, generation))
async def get_scada_presentation(self, task_id, run_id):
return deepcopy(self.scada_presentations.get((task_id, run_id)))
async def save_scada_presentation(self, task_id, run_id, document, now):
self.scada_presentations[(task_id, run_id)] = deepcopy(document)
async def get_latest_graph_progress(self, task_id):
snapshots = [value for (stored_id, _), value in self.progress.items()
if stored_id == task_id