msmith - in flumotion/trunk: . flumotion/manager
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Thu Jul 19 14:03:22 CEST 2007
Author: msmith
Date: Thu Jul 19 14:03:19 2007
New Revision: 5329
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/manager/depgraph.py
flumotion/trunk/flumotion/manager/manager.py
Log:
* flumotion/manager/depgraph.py:
Don't execute things that are already set to true when progressing
through the depgraph.
* flumotion/manager/manager.py:
When a happy running component logs back in, set things in the
depgraph in reverse order to avoid trying to restart it.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Thu Jul 19 14:03:19 2007
@@ -1,5 +1,14 @@
2007-07-19 Michael Smith <msmith at fluendo.com>
+ * flumotion/manager/depgraph.py:
+ Don't execute things that are already set to true when progressing
+ through the depgraph.
+ * flumotion/manager/manager.py:
+ When a happy running component logs back in, set things in the
+ depgraph in reverse order to avoid trying to restart it.
+
+2007-07-19 Michael Smith <msmith at fluendo.com>
+
* flumotion/manager/manager.py:
When a component reconnects that is already happy, clear
moodPending. It probably turned happy while it was disconnected.
Modified: flumotion/trunk/flumotion/manager/depgraph.py
==============================================================================
--- flumotion/trunk/flumotion/manager/depgraph.py (original)
+++ flumotion/trunk/flumotion/manager/depgraph.py Thu Jul 19 14:03:19 2007
@@ -252,6 +252,9 @@
# We set this to true. So perhaps we can progress!
kids = self._dag.getChildrenTyped(object, type)
for (kid, kidtype) in kids:
+ # Skip this for things already True.
+ if self._state[(kid,kidtype)][1]:
+ continue
# For each of these we need to check that ALL the parents are
# now true before we can go further
if reduce(lambda x,y: x and self._state[y][1],
Modified: flumotion/trunk/flumotion/manager/manager.py
==============================================================================
--- flumotion/trunk/flumotion/manager/manager.py (original)
+++ flumotion/trunk/flumotion/manager/manager.py Thu Jul 19 14:03:19 2007
@@ -1249,15 +1249,17 @@
state.set('moodPending', None)
self.debug("Component %s is already in mood %s. Set depgraph "
"appropriately", componentAvatar.avatarId, moods.get(mood).name)
- # TODO: Somehow freeze the depgraph so we don't follow all the links
- # until these 2 or 3 things are all completed?
- self._depgraph.setComponentSetup(state)
+ # We set these in backwards order (start, clockmaster, setup), to
+ # avoid trying to execute the later ones unneccesarily (since we're
+ # already running, we don't want setComponentSetup() to try to start
+ # the component!)
self._depgraph.setComponentStarted(state)
if self._depgraph.isAClockMaster(state):
self.log("Component %s is a clock master and is happy/hungry "
"so must already be providing clock master",
componentAvatar.avatarId)
self._depgraph.setClockMasterStarted(state)
+ self._depgraph.setComponentSetup(state)
self.debug('vishnu registered component %r' % componentAvatar)
self._depgraph.setJobStarted(state)
More information about the flumotion-commit
mailing list