Commits

Johannes Köster committed 9a1431f

Improve SIGINT handling. Cosmetic changes.

Comments (0)

Files changed (3)

snakemake/jobs.py

         self.rule = rule
         self.dag = dag
         self.targetfile = targetfile
+
         self.wildcards_dict = self.rule.get_wildcards(targetfile)
         self.wildcards = Wildcards(fromdict=self.wildcards_dict)
         self._format_wildcards = (self.wildcards

snakemake/rules.py

 
         if wildcards is None:
             wildcards = dict()
-        # TODO validate
         missing_wildcards = self.wildcard_names - set(wildcards.keys())
 
         if missing_wildcards:

snakemake/scheduler.py

 
     def schedule(self):
         """ Schedule jobs that are ready, maximizing cpu usage. """
-        
         while True:
             try:
                 # work around so that the wait does not prevent keyboard interrupts
-                while not self._open_jobs.wait(0xFFFFF): pass
+                while not self._open_jobs.wait(1): pass
             except:
                 # this will be caused because of SIGTERM or SIGINT
                 logger.info("Terminating processes on user request.")