1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-08 19:26:48 +00:00
webvirtcloud/operations/management/commands/run_worker.py
2026-10-14 23:27:57 +03:00

11 lines
330 B
Python

from django.core.management.base import BaseCommand, CommandError
from operations.worker import Worker
class Command(BaseCommand):
help = "Run the job worker (one per installation)."
def handle(self, *args, **options):
if Worker().run() != 0:
raise CommandError("Another worker runs on this host")