From 0334a042602bd8e150274f24ee2522cd78d366a0 Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Thu, 31 Jan 2019 00:14:12 +0300 Subject: [PATCH] fix --- aggregator/signals.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/aggregator/signals.py b/aggregator/signals.py index cb93ab0..803d8f6 100644 --- a/aggregator/signals.py +++ b/aggregator/signals.py @@ -1,4 +1,3 @@ -from django.db import transaction from pyrogram import Error from .client import get_client @@ -13,7 +12,7 @@ def aggregation_source_deleted(sender, instance: AggregationSource, **kwargs): def chat_created(sender, instance: Chat, created, **kwargs): if created: - transaction.on_commit(lambda: collect_new_messages.delay(instance.pk)) + collect_new_messages.delay(instance.pk) def chat_deleted(sender, instance: Chat, **kwargs):