disable hacky db connection keep-alive for postgresql, resolves #135
This commit is contained in:
		
							parent
							
								
									4c5027e0c4
								
							
						
					
					
						commit
						ecb1aaf5b5
					
				| 
						 | 
					@ -5,6 +5,11 @@ from django.db.backends.utils import CursorWrapper
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def patch_ensure_connection():
 | 
					def patch_ensure_connection():
 | 
				
			||||||
    for name, config in settings.DATABASES.items():
 | 
					    for name, config in settings.DATABASES.items():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        # Don't patch for PostgreSQL, it doesn't need it and can cause issues
 | 
				
			||||||
 | 
					        if config['ENGINE'] == 'django.db.backends.postgresql':
 | 
				
			||||||
 | 
					            continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        module = importlib.import_module(config['ENGINE'] + '.base')
 | 
					        module = importlib.import_module(config['ENGINE'] + '.base')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def ensure_connection(self):
 | 
					        def ensure_connection(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue