mirror of
https://github.com/django/daphne.git
synced 2025-07-12 17:02:18 +03:00
Fix up some comments
This commit is contained in:
parent
cd17c88533
commit
76611b7e6e
|
@ -21,13 +21,12 @@ class Command(RunserverCommand):
|
||||||
self.channel_layer = channel_layers[DEFAULT_CHANNEL_LAYER]
|
self.channel_layer = channel_layers[DEFAULT_CHANNEL_LAYER]
|
||||||
if not self.channel_layer.registry.consumer_for_channel("http.request"):
|
if not self.channel_layer.registry.consumer_for_channel("http.request"):
|
||||||
self.channel_layer.registry.add_consumer(ViewConsumer(), ["http.request"])
|
self.channel_layer.registry.add_consumer(ViewConsumer(), ["http.request"])
|
||||||
# Report starting up
|
# Launch worker as subthread
|
||||||
# Launch worker as subthread (including autoreload logic)
|
|
||||||
worker = WorkerThread(self.channel_layer, self.logger)
|
worker = WorkerThread(self.channel_layer, self.logger)
|
||||||
worker.daemon = True
|
worker.daemon = True
|
||||||
worker.start()
|
worker.start()
|
||||||
# Launch server in main thread (Twisted doesn't like being in a
|
# Launch server in 'main' thread. Signals are disabled as it's still
|
||||||
# subthread, and it doesn't need to autoreload as there's no user code)
|
# actually a subthread under the autoreloader.
|
||||||
self.logger.info("Daphne running, listening on %s:%s", self.addr, self.port)
|
self.logger.info("Daphne running, listening on %s:%s", self.addr, self.port)
|
||||||
from daphne.server import Server
|
from daphne.server import Server
|
||||||
Server(
|
Server(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user