[ARVADOS] updated: b60a21fe3482e1f7ca1815e2a90e276a8c377636
Git user
git at public.curoverse.com
Thu Mar 16 16:50:28 EDT 2017
Summary of changes:
services/nodemanager/arvnodeman/daemon.py | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
via b60a21fe3482e1f7ca1815e2a90e276a8c377636 (commit)
from 2c69d491fbbd1461bb5a6dd9c0f0dd493081b45e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit b60a21fe3482e1f7ca1815e2a90e276a8c377636
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Thu Mar 16 16:49:32 2017 -0400
11254: Refactor _node_states
diff --git a/services/nodemanager/arvnodeman/daemon.py b/services/nodemanager/arvnodeman/daemon.py
index cb11521..b4f1784 100644
--- a/services/nodemanager/arvnodeman/daemon.py
+++ b/services/nodemanager/arvnodeman/daemon.py
@@ -243,16 +243,15 @@ class NodeManagerDaemonActor(actor_class):
return s
def _node_states(self, size):
- states = pykka.get_all(rec.actor.get_state()
- for rec in self.cloud_nodes.nodes.itervalues()
- if ((size is None or rec.cloud_node.size.id == size.id) and
- rec.shutdown_actor is None and
- rec.actor is not None))
- states += ['shutdown' for rec in self.cloud_nodes.nodes.itervalues()
- if ((size is None or rec.cloud_node.size.id == size.id) and
- (rec.shutdown_actor is not None or
- rec.actor is None))]
- return states
+ proxy_states = []
+ states = []
+ for rec in self.cloud_nodes.nodes.itervalues():
+ if size is None or rec.cloud_node.size.id == size.id:
+ if rec.shutdown_actor is None and rec.actor is not None:
+ proxy_states.append(rec.actor.get_state())
+ else:
+ states.append("shutdown")
+ return states + pykka.get_all(proxy_states)
def _state_counts(self, size):
states = self._node_states(size)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list