mirror of
				https://github.com/django/daphne.git
				synced 2025-11-04 01:27:33 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			271 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			271 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from django.db import close_old_connections
 | 
						|
from django.dispatch import Signal
 | 
						|
 | 
						|
 | 
						|
consumer_started = Signal(providing_args=["environ"])
 | 
						|
consumer_finished = Signal()
 | 
						|
 | 
						|
# Connect connection closer to consumer finished as well
 | 
						|
consumer_finished.connect(close_old_connections)
 |