Add warning to backend if cronjob is not running (#4550)

This commit is contained in:
Raphael Michel
2024-10-24 22:50:34 +02:00
committed by GitHub
parent 2b6f82502e
commit 22e9a6eb92
3 changed files with 14 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ import time
import traceback
from django.conf import settings
from django.core.cache import cache
from django.core.management.base import BaseCommand
from django.dispatch.dispatcher import NO_RECEIVERS
@@ -57,6 +58,8 @@ class Command(BaseCommand):
def handle(self, *args, **options):
verbosity = int(options['verbosity'])
cache.set("pretix_runperiodic_executed", True, 3600 * 12)
if not periodic_task.receivers or periodic_task.sender_receivers_cache.get(self) is NO_RECEIVERS:
return