Skip to content

Commit

Permalink
Merge pull request #6985 from DIRACGridBot/cherry-pick-2-dfc870f6d-re…
Browse files Browse the repository at this point in the history
…l-v8r0

[sweep:v8r0] Getting the value of /LocalSite/RemoteExecution
  • Loading branch information
chrisburr authored Apr 25, 2023
2 parents 809c8a6 + cd7f420 commit d72a445
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/DIRAC/Workflow/Modules/Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ def _executeCommand(self):
failed = False

# Check whether the execution should be done remotely
is_remote_execution = gConfig.getValue("/LocalSite/RemoteExecution", "false")
if is_remote_execution.lower() in ["true", "yes"]:
if gConfig.getValue("/LocalSite/RemoteExecution", False):
remoteRunner = RemoteRunner(
gConfig.getValue("/LocalSite/Site"),
gConfig.getValue("/LocalSite/GridCE"),
Expand Down
4 changes: 2 additions & 2 deletions src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, siteName=None, ceName=None, queueName=None):
self.log.warn("Trying to get workloadSite from /LocalSite/CEQueue...")
self._workloadQueue = gConfig.getValue("/LocalSite/CEQueue")

@deprecated('Use gConfig.getValue("/LocalSite/RemoteExecution") instead.')
@deprecated('Use gConfig.getValue("/LocalSite/RemoteExecution", False) instead.')
def is_remote_execution(self):
"""Main method: decides whether the execution will be done locally or remotely via a CE.
Expand All @@ -46,7 +46,7 @@ def is_remote_execution(self):
:return: bool
"""
return gConfig.getValue("/LocalSite/RemoteExecution")
return gConfig.getValue("/LocalSite/RemoteExecution", False)

def execute(self, command, workingDirectory=".", numberOfProcessors=1, cleanRemoteJob=True):
"""Execute the command remotely via a CE
Expand Down

0 comments on commit d72a445

Please sign in to comment.