Commits

Johannes Köster committed b77d491

Remove job from running record in case of error. This should fix some hangups in combination with -k.

  • Participants
  • Parent commits 867b02a

Comments (0)

Files changed (2)

snakemake/executors.py

             callback(job)
         except OSError as ex:
             print_exception(ex, self.workflow.linemaps)
-            error_callback()
+            error_callback(job)
 
 
 class CPUExecutor(RealExecutor):
             print_exception(ex, self.workflow.linemaps)
             job.cleanup()
             self.workflow.persistence.cleanup(job)
-            error_callback()
+            error_callback(job)
 
 
 class ClusterExecutor(RealExecutor):
                 os.remove(jobscript)
                 print_exception(
                     ClusterJobException(job), self.workflow.linemaps)
-                error_callback()
+                error_callback(job)
                 return
             time.sleep(1)
 

snakemake/scheduler.py

                 # go on scheduling if open jobs are ready or no job is running
                 self._open_jobs.set()
 
-    def _error(self):
+    def _error(self, job):
         """ Clear jobs and stop the workflow. """
         with self._lock:
             self._errors = True
+            self.running.remove(job)
             if self.keepgoing:
                 logger.warning("Job failed, going on with independent jobs.")
             else: