@@ -124,14 +124,12 @@ def execute_action(self, action_list: [list, dict]) -> Dict[str, str]:
124
124
"""
125
125
auto_control_logger .info (f"execute_action, action_list: { action_list } " )
126
126
if isinstance (action_list , dict ):
127
- action_list : list = action_list .get ("auto_control" , None )
127
+ action_list : list = action_list .get ("auto_control" )
128
128
if action_list is None :
129
129
raise AutoControlActionNullException (executor_list_error )
130
130
execute_record_dict = dict ()
131
131
try :
132
- if len (action_list ) > 0 or isinstance (action_list , list ):
133
- pass
134
- else :
132
+ if len (action_list ) < 0 or isinstance (action_list , list ) is False :
135
133
raise AutoControlActionNullException (action_is_null_error )
136
134
except Exception as error :
137
135
record_action_to_list ("AC_execute_action" , action_list , repr (error ))
@@ -167,14 +165,14 @@ def execute_files(self, execute_files_list: list) -> List[Dict[str, str]]:
167
165
return execute_detail_list
168
166
169
167
def scheduler_event_trigger (
170
- self , function : str , id : str = None , args : Union [list , tuple ] = None ,
168
+ self , function : str , scheduler_id : str = None , args : Union [list , tuple ] = None ,
171
169
kwargs : dict = None , scheduler_type : str = "nonblocking" , wait_type : str = "secondly" ,
172
170
wait_value : int = 1 , ** trigger_args : Any ) -> None :
173
171
if scheduler_type == "nonblocking" :
174
172
scheduler_event = scheduler_manager .nonblocking_scheduler_event_dict .get (wait_type )
175
173
else :
176
174
scheduler_event = scheduler_manager .blocking_scheduler_event_dict .get (wait_type )
177
- scheduler_event (self .event_dict .get (function ), id , args , kwargs , wait_value , ** trigger_args )
175
+ scheduler_event (self .event_dict .get (function ), scheduler_id , args , kwargs , wait_value , ** trigger_args )
178
176
179
177
180
178
executor = Executor ()
0 commit comments