forked from M-Labs/artiq
worker: fix handling of archive parameter during dataset get in examine
This commit is contained in:
parent
c2bddd62e1
commit
780d6d152c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue