Skip to content

Commit

Permalink
Minor changes to reset executor state from config defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
yadudoc committed Jan 15, 2025
1 parent 41e8d4e commit 6d27c40
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions parsl/executors/globus_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,14 @@ def submit(self, func: Callable, resource_specification: Dict[str, Any], *args:
else:
user_endpoint_config = self.user_endpoint_config

orig_spec = self.executor.resource_specification
orig_uep_cof = self.executor.user_endpoint_config
try:
self.executor.resource_specification = res_spec
self.executor.user_endpoint_config = user_endpoint_config
return self.executor.submit(func, *args, **kwargs)
finally:
self.executor.resource_specification = orig_spec
self.executor.user_endpoint_config = orig_uep_cof
# Reset executor state to defaults set at configuration time
self.executor.resource_specification = self.resource_specification
self.executor.user_endpoint_config = self.user_endpoint_config

def shutdown(self):
"""Clean-up the resources associated with the Executor.
Expand Down

0 comments on commit 6d27c40

Please sign in to comment.