having moved inititalisation into startService to handle tub init cleanly,
I neglected the up-call to startService, which wound up not starting the
load_monitor.
also I changed the 'running' attribute to 'started' since 'running' is
the name used internally by MultiService itself.
service.MultiService.__init__(self)
self.provider = provider
self.warn_if_delay_exceeds = warn_if_delay_exceeds
- self.running = False
+ self.started = False
self.last = None
self.stats = deque()
def startService(self):
- if not self.running:
- self.running = True
+ if not self.started:
+ self.started = True
reactor.callLater(self.loop_interval, self.loop)
service.MultiService.startService(self)
def stopService(self):
- self.running = False
+ self.started = False
def loop(self):
- if not self.running:
+ if not self.started:
return
now = time.time()
if self.last is not None:
nickname = self.node.get_config('nickname')
self.node.tub.connectTo(self.gatherer_furl, self._connected, nickname)
d.addCallback(connect)
+ service.MultiService.startService(self)
def count(self, name, delta):
val = self.counters.setdefault(name, 0)