diff --git a/src/django_clickhouse/database.py b/src/django_clickhouse/database.py index 8068d42..a658f00 100644 --- a/src/django_clickhouse/database.py +++ b/src/django_clickhouse/database.py @@ -27,7 +27,7 @@ class Database(InfiDatabase): raise NotImplementedError("This method is not supported by django_clickhouse.") def _send(self, data, settings=None, stream=False): - statsd_key = "%s.query" % (config.STATSD_PREFIX) + statsd_key = "%s.query" % config.STATSD_PREFIX with statsd.timer(statsd_key): return super(Database, self)._send(data, settings=settings, stream=stream) diff --git a/src/django_clickhouse/models.py b/src/django_clickhouse/models.py index 61eaf95..2dd8ea9 100644 --- a/src/django_clickhouse/models.py +++ b/src/django_clickhouse/models.py @@ -3,13 +3,13 @@ This file contains base django model to be synced with ClickHouse. It saves all operations to storage in order to write them to ClickHouse later. """ -from typing import Optional, Any, List, Type, Set +from typing import Optional, Any, Type, Set import six from django.db import transaction from django.db.models.signals import post_save, post_delete from django.dispatch import receiver -from django.db.models import QuesrySet as DjangoQuerySet, Manager as DjangoManager, Model as DjangoModel +from django.db.models import QuerySet as DjangoQuerySet, Manager as DjangoManager, Model as DjangoModel from .configuration import config from .storages import Storage