On clean un peu

This commit is contained in:
Jean-Marie Favreau 2025-02-21 16:12:29 +01:00
parent 85f3dfcb9c
commit 66325fbd30

View File

@ -305,9 +305,15 @@ def at_start(sender, **k):
@app.task(bind=True)
def run_all_recurrent_imports(self):
# set variable to True for debugging fb
only_fb = False
from agenda_culturel.models import RecurrentImport
logger.info("Run all imports")
if only_fb:
imports = RecurrentImport.objects.filter(processor=RecurrentImport.PROCESSOR.FBEVENTS).order_by("pk")
else:
imports = RecurrentImport.objects.all().order_by("pk")
run_recurrent_imports_from_list([imp.pk for imp in imports])