mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-18 23:38:18 +00:00
run a stats provider even if there's no gatherer, since the HTTP /statistics page is then useful. Only run the once-per-second load-monitor if there is a gatherer configured
This commit is contained in:
@ -114,12 +114,9 @@ class Client(node.Node, testutil.PollMixin):
|
||||
|
||||
def init_stats_provider(self):
|
||||
gatherer_furl = self.get_config('stats_gatherer.furl')
|
||||
if gatherer_furl:
|
||||
self.stats_provider = StatsProvider(self, gatherer_furl)
|
||||
self.add_service(self.stats_provider)
|
||||
self.stats_provider.register_producer(self)
|
||||
else:
|
||||
self.stats_provider = None
|
||||
self.stats_provider = StatsProvider(self, gatherer_furl)
|
||||
self.add_service(self.stats_provider)
|
||||
self.stats_provider.register_producer(self)
|
||||
|
||||
def get_stats(self):
|
||||
return { 'node.uptime': time.time() - self.started_timestamp }
|
||||
|
Reference in New Issue
Block a user