Skip to content

Commit

Permalink
api proxy: use the current python interpreter to start uvicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Jun 30, 2022
1 parent f267249 commit cecd548
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stride/api_proxy.py
@@ -1,3 +1,4 @@
import sys
import time
import subprocess
from contextlib import contextmanager
Expand All @@ -20,7 +21,7 @@ def start(enable=True):
"""
if enable:
STRIDE_API_BASE_URL = config.STRIDE_API_BASE_URL
process = subprocess.Popen(['uvicorn', 'open_bus_stride_api.main:app', '--port', '0'])
process = subprocess.Popen([sys.executable, '-m', 'uvicorn', 'open_bus_stride_api.main:app', '--port', '0'])
port = None
try:
for i in range(1, START_WAIT_TIME_ITERATIONS + 1):
Expand Down

0 comments on commit cecd548

Please sign in to comment.