mirror of
https://github.com/sprockets/sprockets.mixins.metrics.git
synced 2024-11-22 03:00:25 +00:00
Pass the IOLoop into the HTTPClient
This commit is contained in:
parent
167fe7af46
commit
9ac286bf65
1 changed files with 3 additions and 1 deletions
|
@ -127,7 +127,6 @@ class InfluxDBCollector(object):
|
|||
io_loop=None, submission_interval=SUBMISSION_INTERVAL,
|
||||
max_batch_size=MAX_BATCH_SIZE, tags=None):
|
||||
self._buffer = list()
|
||||
self._client = httpclient.AsyncHTTPClient(force_instance=True)
|
||||
self._client.configure(None, defaults={'user_agent': _USER_AGENT})
|
||||
self._database = database
|
||||
self._influxdb_url = '{}?db={}'.format(url, database)
|
||||
|
@ -137,6 +136,9 @@ class InfluxDBCollector(object):
|
|||
self._pending = 0
|
||||
self._tags = tags or {}
|
||||
|
||||
self._client = httpclient.AsyncHTTPClient(force_instance=True,
|
||||
io_loop=self._io_loop)
|
||||
|
||||
# Add the periodic callback for submitting metrics
|
||||
LOGGER.info('Starting PeriodicCallback for writing InfluxDB metrics')
|
||||
self._callback = ioloop.PeriodicCallback(self._write_metrics,
|
||||
|
|
Loading…
Reference in a new issue