2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-22 09:54:00 +08:00

worker: fix handling of archive parameter during dataset get in examine

This commit is contained in:
Sebastien Bourdeauducq 2017-01-07 16:20:17 +01:00
parent c2bddd62e1
commit 780d6d152c

View File

@ -136,10 +136,21 @@ register_experiment = make_parent_action("register_experiment")
class ExamineDeviceMgr:
get_device_db = make_parent_action("get_device_db")
@staticmethod
def get(name):
return DummyDevice()
class ExamineDatasetMgr:
@staticmethod
def get(key, archive=False):
return ParentDatasetDB.get(key)
@staticmethod
def update(self, mod):
pass
def examine(device_mgr, dataset_mgr, file):
module = file_import(file)
for class_name, exp_class in module.__dict__.items():
@ -252,7 +263,7 @@ def main():
f["expid"] = pyon.encode(expid)
put_object({"action": "completed"})
elif action == "examine":
examine(ExamineDeviceMgr, ParentDatasetDB, obj["file"])
examine(ExamineDeviceMgr, ExamineDatasetMgr, obj["file"])
put_object({"action": "completed"})
elif action == "terminate":
break