[update] temp save
This commit is contained in:
@@ -105,12 +105,6 @@ class Task:
|
||||
@property
|
||||
def next(self) -> str:
|
||||
return self._task['next']
|
||||
|
||||
def start(self) -> str:
|
||||
self._status = 'start'
|
||||
|
||||
def stop(self) -> str:
|
||||
self._status = 'stop'
|
||||
|
||||
def get_parameter_set_by_device(self, device):
|
||||
return [parameter_set for parameter_set in self.parameter_set.values() if device == parameter_set['target']]
|
||||
@@ -141,6 +135,11 @@ class Task:
|
||||
|
||||
def start(self):
|
||||
self.set_status('running')
|
||||
|
||||
def stop(self):
|
||||
if self.status == 'running':
|
||||
self.do_action('stop')
|
||||
self.set_status('idle')
|
||||
|
||||
def done(self):
|
||||
self.set_status('done')
|
||||
@@ -151,7 +150,7 @@ class Task:
|
||||
def get_match_action_list(self, match_condition_list):
|
||||
return map(lambda condition: [x for x in self._action_list if condition.id in x.get_condition_list()], match_condition_list)
|
||||
|
||||
def do_action(self, action_list):
|
||||
def do_action(self, action):
|
||||
# # match_action = [x for x in self._action_list if condition_id in x.get_condition_list()]
|
||||
|
||||
# for action in match_action:
|
||||
@@ -165,5 +164,5 @@ class Task:
|
||||
}
|
||||
return statuses[status]
|
||||
|
||||
def check_time_condition(self):
|
||||
def check_condition(self, type):
|
||||
return [condition for condition in self._condition_list if condition.match_or_not()]
|
||||
Reference in New Issue
Block a user