mirror of
https://github.com/carrotquest/django-clickhouse.git
synced 2024-11-22 09:06:43 +03:00
Fix time between batches count
This commit is contained in:
parent
2dc8e7a270
commit
36123db73e
|
@ -213,7 +213,7 @@ class ClickHouseModel(with_metaclass(ClickHouseModelMeta, InfiModel)):
|
||||||
with statsd.timer(statsd_key.format('steps.post_sync')):
|
with statsd.timer(statsd_key.format('steps.post_sync')):
|
||||||
storage.post_sync(import_key)
|
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:
|
except RedisLockTimeoutError:
|
||||||
pass # skip this sync round if lock is acquired by another thread
|
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')):
|
with statsd.timer(statsd_key.format('steps.post_sync')):
|
||||||
storage.post_sync(import_key)
|
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:
|
except RedisLockTimeoutError:
|
||||||
pass # skip this sync round if lock is acquired by another thread
|
pass # skip this sync round if lock is acquired by another thread
|
||||||
|
|
Loading…
Reference in New Issue
Block a user