This commit is contained in:
emmatveev 2024-08-18 17:43:34 +03:00
parent acde744461
commit a05edc8945

View File

@ -6,6 +6,7 @@ from django.db import transaction
from django.core.exceptions import ObjectDoesNotExist
from django.core.management import BaseCommand
from django.utils import timezone
from django import db
from pika.adapters.utils.connection_workflow import AMQPConnectorException
from Main.models.outbox_message import OutboxMessage
@ -37,6 +38,7 @@ class MessagingSupport(BaseCommand):
print("Message is not JSON decodable")
return
print(f"Got {data}, processing...")
db.close_old_connections()
try:
outbox_message = OutboxMessage.objects.get(id=data["id"])
except ObjectDoesNotExist: