diff --git a/src/django_clickhouse/clickhouse_models.py b/src/django_clickhouse/clickhouse_models.py index 1367532..d6054a7 100644 --- a/src/django_clickhouse/clickhouse_models.py +++ b/src/django_clickhouse/clickhouse_models.py @@ -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