From 1ae8b8ffd19710f37df182995546894be381fb1a Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Thu, 7 Apr 2016 23:53:48 +0800 Subject: [PATCH] worker_impl: save expid, rid, start_time --- artiq/master/worker_db.py | 3 +-- artiq/master/worker_impl.py | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/artiq/master/worker_db.py b/artiq/master/worker_db.py index 579c0f11c..025aaab82 100644 --- a/artiq/master/worker_db.py +++ b/artiq/master/worker_db.py @@ -205,6 +205,5 @@ class DatasetManager: return self.ddb.get(key) def write_hdf5(self, f): - g = f.create_group("datasets") for k, v in self.local.items(): - g[k] = v + f[k] = v diff --git a/artiq/master/worker_impl.py b/artiq/master/worker_impl.py index 2387793f0..aadd7ebeb 100644 --- a/artiq/master/worker_impl.py +++ b/artiq/master/worker_impl.py @@ -216,10 +216,11 @@ def main(): put_object({"action": "completed"}) elif action == "write_results": with get_hdf5_output(start_time, rid, exp.__name__) as f: - dataset_mgr.write_hdf5(f) + dataset_mgr.write_hdf5(f.create_group("datasets")) f["artiq_version"] = artiq_version - if "repo_rev" in expid: - f["repo_rev"] = expid["repo_rev"] + f["rid"] = rid + f["start_time"] = start_time + f["expid"] = pyon.encode(expid) put_object({"action": "completed"}) elif action == "examine": examine(ExamineDeviceMgr, ParentDatasetDB, obj["file"])