Fix time between batches count

This commit is contained in:
M1ha 2018-12-19 12:52:47 +05:00
parent 2dc8e7a270
commit 36123db73e

View File

@ -213,7 +213,7 @@ class ClickHouseModel(with_metaclass(ClickHouseModelMeta, InfiModel)):
with statsd.timer(statsd_key.format('steps.post_sync')):
storage.post_sync(import_key)
storage.set_last_sync_time(import_key, now())
storage.set_last_sync_time(import_key, datetime.datetime.now())
except RedisLockTimeoutError:
pass # skip this sync round if lock is acquired by another thread
@ -280,7 +280,7 @@ class ClickHouseMultiModel(ClickHouseModel):
with statsd.timer(statsd_key.format('steps.post_sync')):
storage.post_sync(import_key)
storage.set_last_sync_time(import_key, now())
storage.set_last_sync_time(import_key, datetime.datetime.now())
except RedisLockTimeoutError:
pass # skip this sync round if lock is acquired by another thread