parent
e282b6b807
commit
29bda0d620
@ -1,10 +1,12 @@ |
||||
from django.core.management.base import BaseCommand |
||||
from tournaments.tasks import check_confirmation_deadlines |
||||
from background_task.models import Task |
||||
|
||||
class Command(BaseCommand): |
||||
help = 'Run confirmation deadline check immediately' |
||||
|
||||
def handle(self, *args, **options): |
||||
# Run the function directly (not through the task queue) |
||||
Task.objects.filter(task_name='tournaments.tasks.check_confirmation_deadlines').delete() |
||||
check_confirmation_deadlines() |
||||
self.stdout.write(self.style.SUCCESS('Successfully checked confirmation deadlines')) |
||||
|
||||
Loading…
Reference in new issue