Commits

Ronny Pfannschmidt committed 984862d

tell of ressource conflicts better

Comments (0)

Files changed (1)

 from .handlers.utils import watch_for
 import time
 import logbook
+from couchdbkit import ResourceConflict
 
 log = logbook.Logger('juggler', level='info')
 
         steps = procdir.find_steps()
         assert steps
         task.status = 'building'
-        log.debug('building {}', task._id)
-        self.save_doc(task)
+        try:
+            self.save_doc(task)
+            log.debug('building {}', task._id)
+        except ResourceConflict:
+            log.error('building {} failed due to db conflict')
+            return
         for step in steps:
             log.debug(
                 'run {task._id} step {step.index}',