From b8e46bb9c9d6673cb8a605adb10f44553d21d955 Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Fri, 4 Apr 2025 12:11:10 +0200 Subject: [PATCH] add command stopping all streaming conferences --- .../teleforma-stop-all-conferences.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 teleforma/management/commands/teleforma-stop-all-conferences.py diff --git a/teleforma/management/commands/teleforma-stop-all-conferences.py b/teleforma/management/commands/teleforma-stop-all-conferences.py new file mode 100644 index 00000000..a0bfde5b --- /dev/null +++ b/teleforma/management/commands/teleforma-stop-all-conferences.py @@ -0,0 +1,20 @@ +from optparse import make_option +from django.conf import settings +from django.core.management.base import BaseCommand, CommandError +from django.contrib.auth.models import User +from django.template.defaultfilters import slugify +from telemeta.models import * +from telemeta.util.unaccent import unaccent +from teleforma.models import * +from teleforma.views import * +import logging +import codecs + + +class Command(BaseCommand): + help = "Stop all teleforma streaming conferences" + admin_email = 'webmaster@parisson.com' + + def handle(self, *args, **options): + for conference in Conference.objects.filter(streaming=True): + conference.stop() -- 2.39.5