From 89686f9034f1382361d043bd32459d3facfdca12 Mon Sep 17 00:00:00 2001 From: Sean Mc Allister Date: Wed, 13 Jul 2016 14:09:14 +0200 Subject: [PATCH] expose file descriptor on command line --- daphne/cli.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/daphne/cli.py b/daphne/cli.py index cf075b1..ae301eb 100755 --- a/daphne/cli.py +++ b/daphne/cli.py @@ -41,6 +41,13 @@ class CommandLineInterface(object): help='Bind to a UNIX socket rather than a TCP host/port', default=None, ) + self.parser.add_argument( + '--fd', + type=int, + dest='file_descriptor', + help='Bind to a file descriptor rather than a TCP host/port or named unix socket', + default=None, + ) self.parser.add_argument( '-v', '--verbosity', @@ -133,6 +140,7 @@ class CommandLineInterface(object): host=args.host, port=args.port, unix_socket=args.unix_socket, + file_descriptor=args.file_descriptor, http_timeout=args.http_timeout, ping_interval=args.ping_interval, action_logger=AccessLogGenerator(access_log_stream) if access_log_stream else None,