mirror of
				https://github.com/django/daphne.git
				synced 2025-10-31 15:57:25 +03:00 
			
		
		
		
	* Add Delay Protocol Server Add a process that listens to a specific channel and delays incoming messages by a given time. * Add custom django command rundelay * Add test suite * Implements #115 * Add channels.delay app * Add AppConfig * Move rundelay command to channels.delay app * Refactor DelayedMessage into model Move login into a database backed model. * Update Worker * Add migration * Add delay docs page * Add to TOC * Fix import sorting * Add ASGI spec document for Delay Protocol * Update channels.delay doc with new channel name * remove interval docs * Refactor Delay to use milliseconds instead of seconds Use milliseconds as the default unit. Gives more control to developers. * Remove interval logic from DelayedMessage * Remove interval tests * Tweak test logic to use milliseconds
		
			
				
	
	
		
			27 lines
		
	
	
		
			986 B
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			986 B
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
| ===============================================
 | |
| Delay Protocol ASGI Message Format (Draft Spec)
 | |
| ===============================================
 | |
| 
 | |
| Protocol that allows any ASGI message to be delayed for a given number of milliseconds.
 | |
| 
 | |
| This simple protocol enables developers to schedule ASGI messages to be sent at a time in the future.
 | |
| It can be used in conjunction with any other channel. This allows you do simple tasks
 | |
| like scheduling an email to be sent later, to more complex tasks like testing latency in protocols.
 | |
| 
 | |
| 
 | |
| Delay
 | |
| '''''
 | |
| 
 | |
| Send a message to this channel to delay a message.
 | |
| 
 | |
| Channel: ``asgi.delay``
 | |
| 
 | |
| Keys:
 | |
| 
 | |
|     * ``channel``: Unicode string specifying the final destination channel for the message after the delay.
 | |
| 
 | |
|     * ``delay``: Positive integer specifying the number of milliseconds to delay the message.
 | |
| 
 | |
|     * ``content``: Dictionary of unicode string keys for the message content. This should meet the
 | |
| content specifications for the specified destination channel.
 |