mirror of
https://github.com/django/daphne.git
synced 2025-05-28 01:33:04 +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
30 lines
554 B
Python
30 lines
554 B
Python
SECRET_KEY = 'cat'
|
|
|
|
INSTALLED_APPS = (
|
|
'django.contrib.auth',
|
|
'django.contrib.contenttypes',
|
|
'django.contrib.sessions',
|
|
'django.contrib.admin',
|
|
'channels',
|
|
'channels.delay'
|
|
)
|
|
|
|
DATABASES = {
|
|
'default': {
|
|
'ENGINE': 'django.db.backends.sqlite3',
|
|
}
|
|
}
|
|
|
|
CHANNEL_LAYERS = {
|
|
'default': {
|
|
'BACKEND': 'asgiref.inmemory.ChannelLayer',
|
|
'ROUTING': [],
|
|
},
|
|
'fake_channel': {
|
|
'BACKEND': 'channels.tests.test_management.FakeChannelLayer',
|
|
'ROUTING': [],
|
|
}
|
|
}
|
|
|
|
MIDDLEWARE_CLASSES = []
|