2021-06-02 10:00:55 -04:00
|
|
|
from crc.services.data_store_service import DataStoreBase
|
2020-11-18 15:34:50 -05:00
|
|
|
from crc.scripts.script import Script
|
2020-11-10 08:21:46 -05:00
|
|
|
|
|
|
|
|
|
|
|
class StudyDataSet(Script,DataStoreBase):
|
|
|
|
def get_description(self):
|
2021-02-24 12:05:06 -05:00
|
|
|
return """Sets study data from the data store. Takes two positional arguments key and value"""
|
2020-11-10 08:21:46 -05:00
|
|
|
|
|
|
|
def do_task_validate_only(self, task, study_id, workflow_id, *args, **kwargs):
|
2020-11-10 11:32:59 -05:00
|
|
|
self.set_validate_common(study_id,
|
|
|
|
workflow_id,
|
|
|
|
None,
|
|
|
|
'study_data_set',
|
2021-04-26 09:41:14 -04:00
|
|
|
None,
|
2020-11-10 11:32:59 -05:00
|
|
|
*args)
|
2020-11-10 08:21:46 -05:00
|
|
|
|
|
|
|
def do_task(self, task, study_id, workflow_id, *args, **kwargs):
|
2020-11-11 09:44:58 -05:00
|
|
|
return self.set_data_common(task.id,
|
2020-11-10 11:32:59 -05:00
|
|
|
study_id,
|
|
|
|
None,
|
|
|
|
workflow_id,
|
2020-11-11 09:44:58 -05:00
|
|
|
None,
|
2020-11-10 11:32:59 -05:00
|
|
|
'study_data_set',
|
2021-04-26 09:41:14 -04:00
|
|
|
None,
|
2020-11-10 11:32:59 -05:00
|
|
|
*args,
|
|
|
|
**kwargs)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|