def webserver(args): print(settings.HEADER) log_to_stdout() from airflow.www.app import app threads = args.threads or conf.get("webserver", "threads") if args.debug: print("Starting the web server on port {0} and host {1}.".format(args.port, args.hostname)) app.run(debug=True, port=args.port, host=args.hostname) else: print( "Running the Gunicorn server with {threads}" "on host {args.hostname} and port " "{args.port}...".format(**locals()) ) sp = subprocess.Popen( [ "gunicorn", "-w", str(args.threads), "-t", "120", "-b", args.hostname + ":" + str(args.port), "airflow.www.app:app", ] ) sp.wait()
def webserver(args): print(settings.HEADER) log_to_stdout() from airflow.www.app import app if args.debug: print("Starting the web server on port {0} and host {1}.".format(args.port, args.hostname)) app.run(debug=True, port=args.port, host=args.hostname) else: print("Running Tornado server on host {host} and port {port}...".format(host=args.hostname, port=args.port)) from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.wsgi import WSGIContainer http_server = HTTPServer(WSGIContainer(app)) http_server.listen(args.port) IOLoop.instance().start()
def webserver(args): print(settings.HEADER) log_to_stdout() from airflow.www.app import app if args.debug: print("Starting the web server on port {0} and host {1}.".format( args.port, args.hostname)) app.run(debug=True, port=args.port, host=args.hostname) else: print( 'Running Tornado server on host {host} and port {port}...'.format( host=args.hostname, port=args.port)) from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.wsgi import WSGIContainer http_server = HTTPServer(WSGIContainer(app)) http_server.listen(args.port) IOLoop.instance().start()
def webserver(args): print(settings.HEADER) log_to_stdout() from airflow.www.app import app threads = args.threads or conf.get('webserver', 'threads') if args.debug: print( "Starting the web server on port {0} and host {1}.".format( args.port, args.hostname)) app.run(debug=True, port=args.port, host=args.hostname) else: print( 'Running the Gunicorn server with {threads}' 'on host {args.hostname} and port ' '{args.port}...'.format(**locals())) sp = subprocess.Popen([ 'gunicorn', '-w', str(args.threads), '-t', '120', '-b', args.hostname + ':' + str(args.port), 'airflow.www.app:app']) sp.wait()
def webserver(args): print(settings.HEADER) log_to_stdout() from airflow.www.app import app if args.debug: print( "Starting the web server on port {0} and host {1}.".format( args.port, args.hostname)) app.run(debug=True, port=args.port, host=args.hostname) else: print( 'Running Tornado server on host {host} and port {port}...'.format( host=args.hostname, port=args.port)) from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.wsgi import WSGIContainer # simple multi-process server server = HTTPServer(WSGIContainer(app)) server.bind(args.port) server.start(4) # Forks multiple sub-processes IOLoop.instance().start()