15 lines
409 B
Python
15 lines
409 B
Python
from django.core.management.base import BaseCommand
|
|
from django_q.tasks import async_task, result
|
|
|
|
|
|
class Command(BaseCommand):
|
|
def handle(self, *args, **kwargs):
|
|
from inventory.models import Dealer
|
|
|
|
instance = Dealer.objects.first()
|
|
async_task(
|
|
func="inventory.tasks.test_task",
|
|
dealer=instance,
|
|
hook="inventory.hooks.print_results",
|
|
)
|