Changed post operation guage, as sometimes statsd can "skip" metrics

and graph holds invalid counters
This commit is contained in:
M1ha 2019-01-18 17:59:46 +05:00
parent 6a4bf14ea6
commit 9bc6c6154b

View File

@ -64,7 +64,7 @@ class Storage:
:return: None :return: None
""" """
key = "%s.sync.%s.queue" % (config.STATSD_PREFIX, import_key) key = "%s.sync.%s.queue" % (config.STATSD_PREFIX, import_key)
statsd.gauge(key, -batch_size, delta=True) statsd.gauge(key, self.operations_count(import_key), delta=True)
def operations_count(self, import_key, **kwargs): def operations_count(self, import_key, **kwargs):
# type: (str, **dict) -> int # type: (str, **dict) -> int