Skip to content
Snippets Groups Projects
Commit e65e501e authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Parameterize auto-reload and deactivate daemon accordingly

parent 589b4a7f
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ def parse_args(): ...@@ -30,7 +30,7 @@ def parse_args():
return parser.parse_args() return parser.parse_args()
def main(args, app_name='model_server.base.api:app') -> None: def main(args, app_name='model_server.base.api:app', reload=True) -> None:
print('CLI args:\n' + str(args)) print('CLI args:\n' + str(args))
server_process = Process( server_process = Process(
...@@ -41,9 +41,9 @@ def main(args, app_name='model_server.base.api:app') -> None: ...@@ -41,9 +41,9 @@ def main(args, app_name='model_server.base.api:app') -> None:
'host': args.host, 'host': args.host,
'port': int(args.port), 'port': int(args.port),
'log_level': 'debug', 'log_level': 'debug',
'reload': True, 'reload': reload,
}, },
daemon=True, daemon=(reload is False),
) )
url = f'http://{args.host}:{int(args.port):04d}/status' url = f'http://{args.host}:{int(args.port):04d}/status'
print(url) print(url)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment