projects
/
osm
/
N2VC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up deploy example
[osm/N2VC.git]
/
juju
/
model.py
diff --git
a/juju/model.py
b/juju/model.py
index
480813c
..
e56bfb4
100644
(file)
--- a/
juju/model.py
+++ b/
juju/model.py
@@
-53,7
+53,6
@@
class Model(object):
self.connection = connection
self.observers = set()
self.state = dict()
self.connection = connection
self.observers = set()
self.state = dict()
- self._watching = False
@property
def applications(self):
@property
def applications(self):
@@
-63,10
+62,6
@@
class Model(object):
def units(self):
return self.state.get('unit', {})
def units(self):
return self.state.get('unit', {})
- def stop_watching(self):
- self.connection.cancel()
- self._watching = False
-
def add_observer(self, callable_):
"""Register an "on-model-change" callback
def add_observer(self, callable_):
"""Register an "on-model-change" callback
@@
-101,7
+96,7
@@
class Model(object):
self._watching = True
allwatcher = watcher.AllWatcher()
allwatcher.connect(await self.connection.clone())
self._watching = True
allwatcher = watcher.AllWatcher()
allwatcher.connect(await self.connection.clone())
- while
self._watching
:
+ while
True
:
results = await allwatcher.Next()
for delta in results.deltas:
delta = get_entity_delta(delta)
results = await allwatcher.Next()
for delta in results.deltas:
delta = get_entity_delta(delta)