From: Sapan Bhatia Date: Wed, 22 Oct 2014 04:00:31 +0000 (-0400) Subject: Avoid self waits in Observer core X-Git-Url: http://git.onelab.eu/?p=plstackapi.git;a=commitdiff_plain;h=9ff52cad0038920d0761151fe2cf171c48b5e88d Avoid self waits in Observer core --- 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