|
12 | 12 | from executorlib.task_scheduler.base import TaskSchedulerBase, validate_resource_dict |
13 | 13 | from executorlib.task_scheduler.file.shared import execute_tasks_h5 |
14 | 14 | from executorlib.task_scheduler.file.spawner_subprocess import ( |
15 | | - execute_in_subprocess, |
16 | | - terminate_subprocess, |
| 15 | + subprocess_execute, |
| 16 | + subprocess_terminate, |
17 | 17 | ) |
18 | 18 |
|
19 | 19 | try: |
20 | | - from executorlib.standalone.scheduler import terminate_with_pysqa |
| 20 | + from executorlib.standalone.command_pysqa import pysqa_terminate |
21 | 21 | from executorlib.task_scheduler.file.spawner_pysqa import execute_with_pysqa |
22 | 22 | except ImportError: |
23 | 23 | # If pysqa is not available fall back to executing tasks in a subprocess |
24 | | - execute_with_pysqa = execute_in_subprocess # type: ignore |
25 | | - terminate_with_pysqa = None # type: ignore |
| 24 | + execute_with_pysqa = subprocess_execute # type: ignore |
| 25 | + pysqa_terminate = None # type: ignore |
26 | 26 |
|
27 | 27 |
|
28 | 28 | class FileTaskScheduler(TaskSchedulerBase): |
@@ -126,10 +126,10 @@ def create_file_executor( |
126 | 126 | check_executor(executor=flux_executor) |
127 | 127 | check_nested_flux_executor(nested_flux_executor=flux_executor_nesting) |
128 | 128 | check_flux_log_files(flux_log_files=flux_log_files) |
129 | | - if execute_function != execute_in_subprocess: |
130 | | - terminate_function = terminate_with_pysqa # type: ignore |
| 129 | + if execute_function != subprocess_execute: |
| 130 | + terminate_function = pysqa_terminate # type: ignore |
131 | 131 | else: |
132 | | - terminate_function = terminate_subprocess # type: ignore |
| 132 | + terminate_function = subprocess_terminate # type: ignore |
133 | 133 | return FileTaskScheduler( |
134 | 134 | executor_kwargs=executor_kwargs, |
135 | 135 | pysqa_config_directory=pysqa_config_directory, |
|
0 commit comments