mirror of
https://github.com/django-q2/django-q2.git
synced 2026-10-09 03:58:12 +08:00
restructured app and added task signing
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from django_q.apps import Worker
|
||||
from django_q import Cluster
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "My shiny new management command."
|
||||
|
||||
def handle(self, *args, **options):
|
||||
q = Worker()
|
||||
q = Cluster()
|
||||
@@ -1,6 +1,6 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
|
||||
from django_q.apps import defer
|
||||
from django_q import async
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
@@ -8,4 +8,4 @@ class Command(BaseCommand):
|
||||
|
||||
def handle(self, *args, **options):
|
||||
for i in range(20):
|
||||
defer('testq.tasks.multiply', 2, i)
|
||||
async('testq.tasks.multiply', 2, i)
|
||||
|
||||
Reference in New Issue
Block a user