Skip to content

Commit 6057360

Browse files
committed
check monitoring first
1 parent aa58a71 commit 6057360

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

parsl/executors/taskvine/executor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ def submit(self, func, resource_specification, *args, **kwargs):
345345
# Default execution mode of apps is regular
346346
exec_mode = resource_specification.get('exec_mode', self.function_exec_mode)
347347

348+
if exec_mode == 'serverless' and is_monitoring_enabled:
349+
logger.warning("A serverless task cannot run with Parsl monitoring enabled. Falling back to execute this task as a regular task.")
350+
exec_mode = 'regular'
351+
348352
if exec_mode == 'serverless':
349353
if func.__name__ not in self._map_func_names_to_func_details or 'func_obj' not in self._map_func_names_to_func_details[func.__name__]:
350354
self._map_func_names_to_func_details[func.__name__] = {'func_obj': func}
@@ -353,10 +357,6 @@ def submit(self, func, resource_specification, *args, **kwargs):
353357
logger.warning('Inconsistency in a serverless function call detected. A function name cannot point to two different function objects. Falling back to executing it as a regular task.')
354358
exec_mode = 'regular'
355359

356-
if is_monitoring_enabled:
357-
logger.warning("A serverless task cannot run with Parsl monitoring enabled. Falling back to execute this task as a regular task.")
358-
exec_mode = 'regular'
359-
360360
# Detect resources and features of a submitted Parsl app
361361
cores = None
362362
memory = None

0 commit comments

Comments
 (0)