Skip to content

Commit

Permalink
feat: remove RemoteRunner from Script
Browse files Browse the repository at this point in the history
  • Loading branch information
aldbr committed Jan 22, 2024
1 parent 545faab commit c18ef76
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions src/DIRAC/Workflow/Modules/Script.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

from DIRAC import gLogger, gConfig
from DIRAC.Core.Utilities.Subprocess import systemCall
from DIRAC.WorkloadManagementSystem.Utilities.RemoteRunner import RemoteRunner
from DIRAC.Workflow.Modules.ModuleBase import ModuleBase


Expand Down Expand Up @@ -83,22 +82,13 @@ def _executeCommand(self):
"""execute the self.command (uses systemCall)"""
failed = False

# Check whether the execution should be done remotely
if gConfig.getValue("/LocalSite/RemoteExecution", False):
remoteRunner = RemoteRunner(
gConfig.getValue("/LocalSite/Site"),
gConfig.getValue("/LocalSite/GridCE"),
gConfig.getValue("/LocalSite/CEQueue"),
)
retVal = remoteRunner.execute(self.command)
else:
retVal = systemCall(
timeout=0,
cmdSeq=shlex.split(self.command),
env=self.environment,
callbackFunction=self.callbackFunction,
bufferLimit=self.bufferLimit,
)
retVal = systemCall(
timeout=0,
cmdSeq=shlex.split(self.command),
env=self.environment,
callbackFunction=self.callbackFunction,
bufferLimit=self.bufferLimit,
)

if not retVal["OK"]:
failed = True
Expand Down

0 comments on commit c18ef76

Please sign in to comment.