Skip to content
Snippets Groups Projects
Commit b0cfc58f authored by Thomas Kluyver's avatar Thomas Kluyver
Browse files

Fix port number in environment variable

parent 6fb88e57
No related branches found
No related tags found
No related merge requests found
...@@ -36,7 +36,7 @@ async def amain(): ...@@ -36,7 +36,7 @@ async def amain():
else: else:
oauth_info = None oauth_info = None
log.info("Upstream is %s (with%s Oauth)", base_url, log.info("Upstream is %s (with%s Oauth)", base_url,
'' if calcat_cfg['use-oauth2'] else 'out') '' if oauth_info else 'out')
app = ProxyApp(base_url, oauth_info, args.db) app = ProxyApp(base_url, oauth_info, args.db)
log.info("CalParrot will serve constant queries on http://127.0.0.1:%d", app.port) log.info("CalParrot will serve constant queries on http://127.0.0.1:%d", app.port)
...@@ -44,7 +44,7 @@ async def amain(): ...@@ -44,7 +44,7 @@ async def amain():
try: try:
env = os.environ.copy() env = os.environ.copy()
# Tell the child process (running the notebook) to talk to our proxy: # Tell the child process (running the notebook) to talk to our proxy:
env['CAL_CAL_TOOLS_CALCAT'] = "{base-api-url='http://127.0.0.1:{app.port}/api', use-oauth2=false}" env['CAL_CAL_TOOLS_CALCAT'] = "{base-api-url='http://127.0.0.1:%d/api', use-oauth2=false}" % app.port
proc = await asyncio.create_subprocess_exec(*args.command, env=env) proc = await asyncio.create_subprocess_exec(*args.command, env=env)
retcode = await proc.wait() retcode = await proc.wait()
finally: finally:
......
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