From 9ff52cad0038920d0761151fe2cf171c48b5e88d Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Wed, 22 Oct 2014 00:00:31 -0400 Subject: [PATCH] Avoid self waits in Observer core --- planetstack/openstack_observer/event_loop.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/planetstack/openstack_observer/event_loop.py b/planetstack/openstack_observer/event_loop.py index 12965bb..500c0e0 100644 --- a/planetstack/openstack_observer/event_loop.py +++ b/planetstack/openstack_observer/event_loop.py @@ -254,10 +254,13 @@ class PlanetStackObserver: except KeyError: has_deps = False + go = False + if (has_deps): for d in deps: if d==step.__name__: logger.info(" step %s self-wait skipped" % step.__name__) + go = True continue cond = self.step_conditions[d] @@ -266,7 +269,7 @@ class PlanetStackObserver: logger.info(" step %s wait on dep %s" % (step.__name__, d)) cond.wait() cond.release() - go = self.step_status[d] == STEP_STATUS_OK + go = go or self.step_status[d] == STEP_STATUS_OK else: go = True -- 2.43.0