mirror of
https://github.com/django/daphne.git
synced 2025-10-27 14:01:03 +03:00
* Use a mixin for common test-case code. This way we can have both a regular channels test-case, and a transaction test-case, too. * Adding a reference to django-cq. * Adding the ability to launch a number of workers in threads. This is to try and help reduce memory consumption. * Adding a signal for process level worker startups. * Cleaning up the threaded worker code. * Use Python 2.7 friendly code. * Making the runworker command show a little more information about how many threads are running. * Moving the worker ready signal into a method in order to support polymorphic behavior. * Ugh, I'm an idiot. Was launching the wrong run. * Adding a call to the workers' `ready` in `runserver`.
12 lines
327 B
Python
12 lines
327 B
Python
from django.db import close_old_connections
|
|
from django.dispatch import Signal
|
|
|
|
|
|
consumer_started = Signal(providing_args=["environ"])
|
|
consumer_finished = Signal()
|
|
worker_ready = Signal()
|
|
worker_process_ready = Signal()
|
|
|
|
# Connect connection closer to consumer finished as well
|
|
consumer_finished.connect(close_old_connections)
|