This commit is contained in:
M1ha 2019-01-23 10:34:27 +05:00
parent 882930a3a8
commit c934ff4df5
2 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ class Database(InfiDatabase):
raise NotImplementedError("This method is not supported by django_clickhouse.") raise NotImplementedError("This method is not supported by django_clickhouse.")
def _send(self, data, settings=None, stream=False): 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): with statsd.timer(statsd_key):
return super(Database, self)._send(data, settings=settings, stream=stream) return super(Database, self)._send(data, settings=settings, stream=stream)

View File

@ -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. 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 import six
from django.db import transaction from django.db import transaction
from django.db.models.signals import post_save, post_delete from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver 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 .configuration import config
from .storages import Storage from .storages import Storage