1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-11 12:46:49 +00:00

feat(operations): the job worker

This commit is contained in:
catborise 2026-10-13 18:32:36 +03:00
parent 34582d23f3
commit a35284bbc9
10 changed files with 791 additions and 50 deletions

View file

View file

@ -0,0 +1,11 @@
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")