On clean un peu
This commit is contained in:
		@@ -305,10 +305,16 @@ 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")
 | 
			
		||||
    imports = RecurrentImport.objects.all().order_by("pk")
 | 
			
		||||
    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])
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user