Skip to content

Commit

Permalink
ops: tweak worker check to listen on $PORT env var
Browse files Browse the repository at this point in the history
  • Loading branch information
frankie567 committed Dec 20, 2024
1 parent 75a3e0c commit 8f2d83d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion server/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ backoffice = [

[tool.taskipy.tasks]
api = { cmd = "task verify_github_app && env AUTHLIB_INSECURE_TRANSPORT=true uvicorn polar.app:app --reload --workers 1 --host 127.0.0.1 --port 8000", help = "run api service" }
worker = { cmd = "UVICORN_PORT=8888 watchfiles 'supervisord -c supervisord.worker.conf' polar", help = "run worker" }
worker = { cmd = "PORT=8888 watchfiles 'supervisord -c supervisord.worker.conf' polar", help = "run worker" }
test = { cmd = "POLAR_ENV=testing python -m pytest --cov polar/ --cov-report=term-missing", help = "run all tests" }
test_fast = { cmd = "POLAR_ENV=testing python -m pytest -n auto -p no:sugar --no-cov", help = "run all tests, but fast" }
watch_email = { cmd = "POLAR_TEST_WATCH=1 pytest -s -m", help = "preview emails" }
Expand Down
2 changes: 1 addition & 1 deletion server/supervisord.worker.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0

[program:worker_health]
command=uvicorn worker_health:app --host 0.0.0.0
command=uvicorn worker_health:app --host 0.0.0.0 --port %(ENV_PORT)s
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
stdout_logfile_maxbytes=0
Expand Down
2 changes: 1 addition & 1 deletion server/supervisord.worker_github.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ stdout_logfile_maxbytes=0
stderr_logfile_maxbytes=0

[program:worker_health]
command=uvicorn worker_health:app --host 0.0.0.0
command=uvicorn worker_health:app --host 0.0.0.0 --port %(ENV_PORT)s
stdout_logfile=/dev/stdout
stderr_logfile=/dev/stderr
stdout_logfile_maxbytes=0
Expand Down

0 comments on commit 8f2d83d

Please sign in to comment.