]> git.parisson.com Git - teleforma.git/commitdiff
add command stopping all streaming conferences
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 4 Apr 2025 10:11:10 +0000 (12:11 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Fri, 4 Apr 2025 10:11:10 +0000 (12:11 +0200)
teleforma/management/commands/teleforma-stop-all-conferences.py [new file with mode: 0644]

diff --git a/teleforma/management/commands/teleforma-stop-all-conferences.py b/teleforma/management/commands/teleforma-stop-all-conferences.py
new file mode 100644 (file)
index 0000000..a0bfde5
--- /dev/null
@@ -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()