mirror of
				https://github.com/sb745/NyaaV3.git
				synced 2025-11-04 01:45:46 +02:00 
			
		
		
		
	import_to_es: fix put_settings not being strings
annoying.
This commit is contained in:
		
							parent
							
								
									c4dbbdae7b
								
							
						
					
					
						commit
						4a777376a2
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -92,9 +92,9 @@ def page_query(query, limit=sys.maxsize, batch_size=10000):
 | 
				
			||||||
        start = min(limit, start + batch_size)
 | 
					        start = min(limit, start + batch_size)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# turn off refreshes while bulk loading
 | 
					# turn off refreshes while bulk loading
 | 
				
			||||||
ic.put_settings(body={'index': {'refresh_interval': -1}}, index=app.config['ES_INDEX_NAME'])
 | 
					ic.put_settings(body={'index': {'refresh_interval': '-1'}}, index=app.config['ES_INDEX_NAME'])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
helpers.bulk(es, (mk_es(t) for t in page_query(Torrent.query)), chunk_size=10000)
 | 
					helpers.bulk(es, (mk_es(t) for t in page_query(Torrent.query)), chunk_size=10000)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# restore to near-enough real time
 | 
					# restore to near-enough real time
 | 
				
			||||||
ic.put_settings(body={'index': {'refresh_interval': 30}}, index=app.config['ES_INDEX_NAME'])
 | 
					ic.put_settings(body={'index': {'refresh_interval': '30s'}}, index=app.config['ES_INDEX_NAME'])
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue