Skip to content

Commit dfc870f

Browse files
authored
Merge pull request #6984 from chrisburr/remote-exec-false
[v7r3] Getting the value of /LocalSite/RemoteExecution
2 parents b381c2f + 0fc842e commit dfc870f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/DIRAC/Workflow/Modules/Script.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ def _executeCommand(self):
8989
failed = False
9090

9191
# Check whether the execution should be done remotely
92-
is_remote_execution = gConfig.getValue("/LocalSite/RemoteExecution", "false")
93-
if is_remote_execution.lower() in ["true", "yes"]:
92+
if gConfig.getValue("/LocalSite/RemoteExecution", False):
9493
remoteRunner = RemoteRunner(
9594
gConfig.getValue("/LocalSite/Site"),
9695
gConfig.getValue("/LocalSite/GridCE"),

src/DIRAC/WorkloadManagementSystem/Utilities/RemoteRunner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, siteName=None, ceName=None, queueName=None):
3838
self.log.warn("Trying to get workloadSite from /LocalSite/CEQueue...")
3939
self._workloadQueue = gConfig.getValue("/LocalSite/CEQueue")
4040

41-
@deprecated('Use gConfig.getValue("/LocalSite/RemoteExecution") instead.')
41+
@deprecated('Use gConfig.getValue("/LocalSite/RemoteExecution", False) instead.')
4242
def is_remote_execution(self):
4343
"""Main method: decides whether the execution will be done locally or remotely via a CE.
4444
@@ -47,7 +47,7 @@ def is_remote_execution(self):
4747
4848
:return: bool
4949
"""
50-
return gConfig.getValue("/LocalSite/RemoteExecution")
50+
return gConfig.getValue("/LocalSite/RemoteExecution", False)
5151

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

0 commit comments

Comments
 (0)