mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
11 lines
330 B
Python
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")
|