|
25 | 25 | from automation_file.utils.json.json_file import read_action_json |
26 | 26 | from automation_file.utils.logging.loggin_instance import file_automation_logger |
27 | 27 | from automation_file.utils.package_manager.package_manager_class import package_manager |
28 | | -from automation_file.utils.scheduler.extend_apscheduler import scheduler_manager |
29 | 28 |
|
30 | 29 |
|
31 | 30 | class Executor(object): |
@@ -72,15 +71,6 @@ def __init__(self): |
72 | 71 | "FA_execute_action": self.execute_action, |
73 | 72 | "FA_execute_files": self.execute_files, |
74 | 73 | "FA_add_package_to_executor": package_manager.add_package_to_executor, |
75 | | - # Scheduler |
76 | | - "FA_scheduler_event_trigger": self.scheduler_event_trigger, |
77 | | - "FA_remove_blocking_scheduler_job": scheduler_manager.remove_blocking_job, |
78 | | - "FA_remove_nonblocking_scheduler_job": scheduler_manager.remove_nonblocking_job, |
79 | | - "FA_start_blocking_scheduler": scheduler_manager.start_block_scheduler, |
80 | | - "FA_start_nonblocking_scheduler": scheduler_manager.start_nonblocking_scheduler, |
81 | | - "FA_start_all_scheduler": scheduler_manager.start_all_scheduler, |
82 | | - "FA_shutdown_blocking_scheduler": scheduler_manager.shutdown_blocking_scheduler, |
83 | | - "FA_shutdown_nonblocking_scheduler": scheduler_manager.shutdown_nonblocking_scheduler, |
84 | 74 | } |
85 | 75 | # get all builtin function and add to event dict |
86 | 76 | for function in getmembers(builtins, isbuiltin): |
@@ -145,16 +135,6 @@ def execute_files(self, execute_files_list: list) -> list: |
145 | 135 | execute_detail_list.append(self.execute_action(read_action_json(file))) |
146 | 136 | return execute_detail_list |
147 | 137 |
|
148 | | - def scheduler_event_trigger( |
149 | | - self, function: str, id: str = None, args: Union[list, tuple] = None, |
150 | | - kwargs: dict = None, scheduler_type: str = "nonblocking", wait_type: str = "secondly", |
151 | | - wait_value: int = 1, **trigger_args: Any) -> None: |
152 | | - if scheduler_type == "nonblocking": |
153 | | - scheduler_event = scheduler_manager.nonblocking_scheduler_event_dict.get(wait_type) |
154 | | - else: |
155 | | - scheduler_event = scheduler_manager.blocking_scheduler_event_dict.get(wait_type) |
156 | | - scheduler_event(self.event_dict.get(function), id, args, kwargs, wait_value, **trigger_args) |
157 | | - |
158 | 138 |
|
159 | 139 | executor = Executor() |
160 | 140 | package_manager.executor = executor |
|
0 commit comments