From: Guillaume Pellerin Date: Fri, 4 Apr 2025 10:11:10 +0000 (+0200) Subject: add command stopping all streaming conferences X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=b8e46bb9c9d6673cb8a605adb10f44553d21d955;p=teleforma.git add command stopping all streaming conferences --- 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()