From 073eb325b6870edf100e3780540e921cc5e56496 Mon Sep 17 00:00:00 2001 From: Dan Krause Date: Thu, 12 Feb 2015 15:07:02 -0600 Subject: catch NotFound errors when consuming or abandoning If the zk node disappears underneath the conductor before it attempts to abandon or consume a job, consumption/abandonment would fail with an uncaught exception, killing the conductor. Catching excp.NotFound corrects this. Change-Id: Iaa7d0d8d0ebbc76973f16d717cc3137c75fbfec2 --- taskflow/conductors/single_threaded.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskflow/conductors/single_threaded.py b/taskflow/conductors/single_threaded.py index 126917f..d6cd072 100644 --- a/taskflow/conductors/single_threaded.py +++ b/taskflow/conductors/single_threaded.py @@ -147,7 +147,7 @@ class SingleThreadedConductor(base.Conductor): self._jobboard.consume(job, self._name) else: self._jobboard.abandon(job, self._name) - except excp.JobFailure: + except (excp.JobFailure, excp.NotFound): if consume: LOG.warn("Failed job consumption: %s", job, exc_info=True) -- cgit v1.2.1