Add script for pausing FB
This commit is contained in:
		
							
								
								
									
										9
									
								
								src/scripts/set_pause.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								src/scripts/set_pause.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,9 @@
 | 
			
		||||
from agenda_culturel.models import RecurrentImport
 | 
			
		||||
 | 
			
		||||
def run():
 | 
			
		||||
    rimports = RecurrentImport.objects.filter(processor="Facebook events").all()
 | 
			
		||||
 | 
			
		||||
    for r in rimports:
 | 
			
		||||
        r.downloader = "chromium (pause)"
 | 
			
		||||
    
 | 
			
		||||
    RecurrentImport.objects.bulk_update(rimports, fields=["downloader"])
 | 
			
		||||
		Reference in New Issue
	
	Block a user