Merge pull request #29382 from MI-OSiRIS/prometheus_scrape_interval

mgr/prometheus: Cast collect_timeout (scrape_interval) to float
This commit is contained in:
Jan Fajerski 2019-08-07 08:05:43 +02:00 committed by GitHub
commit 47fecd80d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1061,8 +1061,8 @@ class Module(MgrModule):
raise cherrypy.HTTPError(503, 'No MON connection')
# Make the cache timeout for collecting configurable
self.collect_timeout = self.get_localized_module_option(
'scrape_interval', 5.0)
self.collect_timeout = float(self.get_localized_module_option(
'scrape_interval', 5.0))
server_addr = self.get_localized_module_option(
'server_addr', get_default_addr())