update stats in rethinkdb only every 2.0 seconds instead of every 0.5

This commit is contained in:
Noah Levitt 2015-11-12 00:54:29 +00:00
parent 734b2f5396
commit fb58244c4f

View File

@ -160,7 +160,7 @@ class RethinkStatsDb:
self._batch = {}
if not self._stop.is_set():
self._timer = threading.Timer(0.5, self._update_batch)
self._timer = threading.Timer(2.0, self._update_batch)
self._timer.name = "RethinkStats-batch-update-timer-%s" % datetime.datetime.utcnow().isoformat()
self._timer.start()
else: