diff options
author | Dan Krause <dan.krause@rackspace.com> | 2015-02-12 15:07:02 -0600 |
---|---|---|
committer | Dan Krause <dan.krause@rackspace.com> | 2015-02-12 15:07:02 -0600 |
commit | 073eb325b6870edf100e3780540e921cc5e56496 (patch) | |
tree | 62310e8ceaad6cbb2643999c36c5298c982b671a | |
parent | c6d57a022793e9195dd3355bbfd35e8c96c6dd64 (diff) | |
download | taskflow-073eb325b6870edf100e3780540e921cc5e56496.tar.gz |
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
-rw-r--r-- | taskflow/conductors/single_threaded.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |