mirror of
https://github.com/sprockets/sprockets-influxdb.git
synced 2024-11-15 03:00:24 +00:00
Ensure the value is a float
This commit is contained in:
parent
a4c601d69b
commit
deba0752da
1 changed files with 7 additions and 5 deletions
|
@ -587,8 +587,8 @@ def _start_timeout():
|
|||
|
||||
LOGGER.debug('Adding a new timeout in %i ms', _timeout_interval)
|
||||
_maybe_stop_timeout()
|
||||
_timeout = _io_loop.add_timeout(_io_loop.time() + _timeout_interval / 1000,
|
||||
_on_timeout)
|
||||
_timeout = _io_loop.add_timeout(
|
||||
_io_loop.time() + _timeout_interval / 1000.0, _on_timeout)
|
||||
|
||||
|
||||
def _trigger_batch_write():
|
||||
|
@ -689,7 +689,8 @@ def _write_error_batch(batch, database, measurements):
|
|||
future, batch, database, measurement, measurements)
|
||||
|
||||
|
||||
def _write_error_batch_wait(future, batch, database, measurement, measurements):
|
||||
def _write_error_batch_wait(future, batch, database, measurement,
|
||||
measurements):
|
||||
"""Invoked by the IOLoop, this method checks if the HTTP request future
|
||||
created by :meth:`_write_error_batch` is done. If it's done it will
|
||||
evaluate the result, logging any error and moving on to the next
|
||||
|
@ -719,8 +720,9 @@ def _write_error_batch_wait(future, batch, database, measurement, measurements):
|
|||
LOGGER.info('Bad %s measurement from batch %s: %s',
|
||||
database, batch, measurement)
|
||||
else:
|
||||
LOGGER.error('Error submitting individual metric for %s from batch '
|
||||
'%s to InfluxDB (%s): %s', database, batch, error.code)
|
||||
LOGGER.error('Error submitting individual metric for %s from '
|
||||
'batch %s to InfluxDB (%s): %s',
|
||||
database, batch, error.code)
|
||||
measurements = measurements + [measurement]
|
||||
elif isinstance(error, (TimeoutError, OSError, socket.error,
|
||||
select.error, ssl.socket_error)):
|
||||
|
|
Loading…
Reference in a new issue