|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
|
from django.core.management.base import BaseCommand |
|
|
|
|
from tournaments.tasks import check_confirmation_deadlines |
|
|
|
|
from tournaments.tasks import background_task_check_confirmation_deadlines |
|
|
|
|
from django.utils import timezone |
|
|
|
|
import datetime |
|
|
|
|
from background_task.models import Task |
|
|
|
|
@ -43,7 +43,7 @@ class Command(BaseCommand): |
|
|
|
|
seconds_until_first_run = 0 # If somehow negative, run immediately |
|
|
|
|
|
|
|
|
|
# Schedule with seconds delay instead of a specific datetime |
|
|
|
|
check_confirmation_deadlines( |
|
|
|
|
background_task_check_confirmation_deadlines( |
|
|
|
|
schedule=int(seconds_until_first_run), # Delay in seconds before first run |
|
|
|
|
repeat=settings.BACKGROUND_SCHEDULED_TASK_INTERVAL * 60 # 30 minutes in seconds |
|
|
|
|
) |
|
|
|
|
|