Skip to content

Commit

Permalink
fix: Do not scheduler execution message if no jobs are ready
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneskoester committed Jan 31, 2024
1 parent 3b51201 commit b1c4f47
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions snakemake/scheduler.py
Expand Up @@ -291,17 +291,18 @@ def schedule(self):
# remove from ready_jobs
self.workflow.dag.register_running(run)

logger.info(f"Execute {len(run)} jobs...")

# actually run jobs
local_runjobs = [job for job in run if job.is_local]
runjobs = [job for job in run if not job.is_local]
if local_runjobs:
self.run(
local_runjobs, executor=self._local_executor or self._executor
)
if runjobs:
self.run(runjobs)
if run:
logger.info(f"Execute {len(run)} jobs...")

# actually run jobs
local_runjobs = [job for job in run if job.is_local]
runjobs = [job for job in run if not job.is_local]
if local_runjobs:
self.run(
local_runjobs, executor=self._local_executor or self._executor
)
if runjobs:
self.run(runjobs)
except (KeyboardInterrupt, SystemExit):
logger.info(
"Terminating processes on user request, this might take some time."
Expand Down

0 comments on commit b1c4f47

Please sign in to comment.