From c9ecfa5c717491e2ee0d18f49165ada104e3ff81 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Sat, 1 Aug 2026 10:52:00 +0200 Subject: [PATCH] undo notify pub thread --- teleforma/models/core.py | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/teleforma/models/core.py b/teleforma/models/core.py index 40f73575..9b3eeaa0 100644 --- a/teleforma/models/core.py +++ b/teleforma/models/core.py @@ -693,7 +693,7 @@ class Conference(models.Model): def _notify_live_conference_thread(conference_id): - """Fonction exécutée dans un thread séparé pour notifier la conférence live.""" + """Fonction exécutée dans un thread séparé pour notifier la conférence.""" from django.db import connection from teleforma.models.core import Conference try: @@ -703,11 +703,6 @@ def _notify_live_conference_thread(conference_id): conference.notify_live_sync() conference.notified_live = True conference.save() - if not conference.streaming and not conference.notified: - logger.info("notify conference publication on secondary thread " + str(conference.id)) - conference.notify_live_sync() - conference.notified = True - conference.save() except Conference.DoesNotExist: pass except Exception: @@ -716,27 +711,6 @@ def _notify_live_conference_thread(conference_id): connection.close() -def _notify_conference_publication_thread(conference_id): - """Fonction exécutée dans un thread séparé pour notifier la publication de la conférence.""" - from django.db import connection - from teleforma.models.core import Conference - try: - conference = Conference.objects.get(id=conference_id) - if not conference.streaming and not conference.notified: - logger.info("notify conference publication on secondary thread " + str(conference.id)) - conference.notify_live_sync() - conference.notified = True - conference.save() - - except Conference.DoesNotExist: - pass - except Exception: - pass - finally: - connection.close() - - - def notif_live_conference_thread(sender, instance, *args, **kwargs): if instance.streaming and not instance.notified_live: thread = threading.Thread(target=_notify_live_conference_thread, args=(instance.id,)) @@ -754,7 +728,6 @@ def notif_live_conference_sync(sender, instance, *args, **kwargs): instance.notified_live = True instance.save() - post_save.connect(notif_live_conference_thread, sender=Conference) -- 2.47.3