Hooking up hostname and port to defaults and command line
This commit is contained in:
Родитель
162acc4755
Коммит
729da97acb
|
@ -110,7 +110,7 @@ def webserver(args):
|
|||
print(settings.HEADER)
|
||||
from www.app import app
|
||||
print("Starting the web server on port {0}.".format(args.port))
|
||||
app.run(debug=True, port=args.port)
|
||||
app.run(debug=True, port=args.port, host=args.hostname)
|
||||
|
||||
|
||||
def master(args):
|
||||
|
@ -299,11 +299,17 @@ if __name__ == '__main__':
|
|||
parser_webserver = subparsers.add_parser('webserver', help=ht)
|
||||
parser_webserver.add_argument(
|
||||
"-p", "--port",
|
||||
default=8080,
|
||||
default=settings.WEB_SERVER_PORT,
|
||||
type=int,
|
||||
help="Set the port on which to run the web server")
|
||||
parser_webserver.set_defaults(func=webserver)
|
||||
|
||||
parser_webserver.add_argument(
|
||||
"-hn", "--hostname",
|
||||
default=settings.WEB_SERVER_HOST,
|
||||
help="Set the hostname on which to run the web server")
|
||||
parser_webserver.set_defaults(func=webserver)
|
||||
|
||||
ht = "Start a master scheduler instance"
|
||||
parser_master = subparsers.add_parser('master', help=ht)
|
||||
parser_master.add_argument(
|
||||
|
|
|
@ -31,6 +31,9 @@ LOG_FORMAT = \
|
|||
PRESTO_DEFAULT_DBID = "presto_default"
|
||||
HIVE_DEFAULT_DBID = "hive_default"
|
||||
|
||||
WEB_SERVER_HOST = '0.0.0.0'
|
||||
WEB_SERVER_PORT = 8080
|
||||
|
||||
Session = sessionmaker()
|
||||
#engine = create_engine('mysql://airflow:airflow@localhost/airflow')
|
||||
engine = create_engine('sqlite:///' + BASE_FOLDER + '/airflow.db' )
|
||||
|
|
Загрузка…
Ссылка в новой задаче