mirror of
https://github.com/sprockets/sprockets-influxdb.git
synced 2024-11-14 19:29:29 +00:00
Actually drop the metric when not enabled
This commit is contained in:
parent
b7ada3911c
commit
f6a9b2071a
1 changed files with 3 additions and 1 deletions
|
@ -20,7 +20,7 @@ except ImportError: # pragma: no cover
|
|||
logging.critical('Could not import Tornado')
|
||||
concurrent, httpclient, ioloop = None, None, None
|
||||
|
||||
version_info = (1, 3, 1)
|
||||
version_info = (1, 3, 2)
|
||||
__version__ = '.'.join(str(v) for v in version_info)
|
||||
__all__ = ['__version__', 'version_info', 'add_measurement', 'flush',
|
||||
'install', 'shutdown', 'Measurement']
|
||||
|
@ -130,6 +130,8 @@ def add_measurement(measurement):
|
|||
if not _enabled:
|
||||
LOGGER.debug('Discarding measurement for %s while not enabled',
|
||||
measurement.database)
|
||||
return
|
||||
|
||||
if _stopping:
|
||||
LOGGER.warning('Discarding measurement for %s while stopping',
|
||||
measurement.database)
|
||||
|
|
Loading…
Reference in a new issue