Skip to content

Commit

Permalink
have made localExecutor the fallback Executor
Browse files Browse the repository at this point in the history
  • Loading branch information
Acribbs committed Nov 10, 2024
1 parent 0f40522 commit ba6edea
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cgatcore/pipeline/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,23 @@ def get_executor(options=None):

queue_manager = options.get("cluster_queue_manager", None)

# Check for KubernetesExecutor
if queue_manager == "kubernetes" and KubernetesExecutor is not None:
return KubernetesExecutor(**options)
elif queue_manager == "sge":

# Check for SGEExecutor (Sun Grid Engine)
elif queue_manager == "sge" and shutil.which("qsub") is not None:
return SGEExecutor(**options)
elif queue_manager == "slurm":

# Check for SlurmExecutor
elif queue_manager == "slurm" and shutil.which("sbatch") is not None:
return SlurmExecutor(**options)
elif queue_manager == "torque":

# Check for TorqueExecutor
elif queue_manager == "torque" and shutil.which("qsub") is not None:
return TorqueExecutor(**options)

# Fallback to LocalExecutor
else:
return LocalExecutor(**options)

Expand Down

0 comments on commit ba6edea

Please sign in to comment.