diff --git a/port_stats/tasks.py b/port_stats/tasks.py index a225a7a..b2a02fa 100644 --- a/port_stats/tasks.py +++ b/port_stats/tasks.py @@ -50,6 +50,11 @@ def load_task(task_path, cached_task=None, now=None): with open(info_path) as f: data = json.load(f) + # hack(iv@): sometimes info.json is moved before the state + # is set to DONE. we need to fix this in girar, but for now + # we opt for a simpler workaround: + if '/archive/done/' in task_path: + data['state'] = 'DONE' except Exception as ex: LOG.error("Failed to load task info from %s: %s", task_path, ex) return cached_task