Преглед изворни кода

celerybeat django management command

Ask Solem пре 15 година
родитељ
комит
276a9d19ee
1 измењених фајлова са 17 додато и 0 уклоњено
  1. 17 0
      celery/management/commands/celerybeat.py

+ 17 - 0
celery/management/commands/celerybeat.py

@@ -0,0 +1,17 @@
+"""
+
+Start the celery clock service from the Django management command.
+
+"""
+from django.core.management.base import BaseCommand
+from celery.bin.celerybeat import run_clockservice, OPTION_LIST
+
+
+class Command(BaseCommand):
+    """Run the celery daemon."""
+    option_list = BaseCommand.option_list + OPTION_LIST
+    help = 'Run the celery daemon'
+
+    def handle(self, *args, **options):
+        """Handle the management command."""
+        run_clockservice(**options)