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)
|
LOGGER.debug('Adding a new timeout in %i ms', _timeout_interval)
|
||||||
_maybe_stop_timeout()
|
_maybe_stop_timeout()
|
||||||
_timeout = _io_loop.add_timeout(_io_loop.time() + _timeout_interval / 1000,
|
_timeout = _io_loop.add_timeout(
|
||||||
_on_timeout)
|
_io_loop.time() + _timeout_interval / 1000.0, _on_timeout)
|
||||||
|
|
||||||
|
|
||||||
def _trigger_batch_write():
|
def _trigger_batch_write():
|
||||||
|
@ -689,7 +689,8 @@ def _write_error_batch(batch, database, measurements):
|
||||||
future, batch, database, measurement, 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
|
"""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
|
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
|
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',
|
LOGGER.info('Bad %s measurement from batch %s: %s',
|
||||||
database, batch, measurement)
|
database, batch, measurement)
|
||||||
else:
|
else:
|
||||||
LOGGER.error('Error submitting individual metric for %s from batch '
|
LOGGER.error('Error submitting individual metric for %s from '
|
||||||
'%s to InfluxDB (%s): %s', database, batch, error.code)
|
'batch %s to InfluxDB (%s): %s',
|
||||||
|
database, batch, error.code)
|
||||||
measurements = measurements + [measurement]
|
measurements = measurements + [measurement]
|
||||||
elif isinstance(error, (TimeoutError, OSError, socket.error,
|
elif isinstance(error, (TimeoutError, OSError, socket.error,
|
||||||
select.error, ssl.socket_error)):
|
select.error, ssl.socket_error)):
|
||||||
|
|
Loading…
Reference in a new issue