Skip to content

Commit

Permalink
replace API_PORT with PERFORMANCE_SERVICE_BASE_URL
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Nov 11, 2023
1 parent d322dfc commit d007ad0
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ APP_ENV=local
APP_COMPONENT=api
APP_HOST=127.0.0.1
APP_PORT=8787
API_PORT=8665
CODE_HOTRELOAD=false
SERVICE_READINESS_TIMEOUT=60
PULL_SECRETS_FROM_VAULT=
PERFORMANCE_SERVICE_BASE_URL=http://localhost:8665
5 changes: 2 additions & 3 deletions app/common/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ def read_bool(value: str) -> bool:
APP_COMPONENT = os.environ["APP_COMPONENT"]
APP_HOST = os.environ["APP_HOST"]
APP_PORT = int(os.environ["APP_PORT"])
API_PORT = int(os.environ["API_PORT"])

CODE_HOTRELOAD = read_bool(os.environ["CODE_HOTRELOAD"])

SERVICE_READINESS_TIMEOUT = int(os.environ["SERVICE_READINESS_TIMEOUT"])

PULL_SECRETS_FROM_VAULT = read_bool(os.environ["PULL_SECRETS_FROM_VAULT"])

PERFORMANCE_SERVICE_BASE_URL = os.environ["PERFORMANCE_SERVICE_BASE_URL"]
2 changes: 1 addition & 1 deletion app/repositories/leaderboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class LeaderboardsRepo:
BASE_URI = f"http://localhost:{settings.API_PORT}"
BASE_URI = settings.PERFORMANCE_SERVICE_BASE_URL

def __init__(self, ctx: Context) -> None:
self.ctx = ctx
Expand Down
2 changes: 1 addition & 1 deletion app/repositories/reworks.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class ReworksRepo:
BASE_URI = f"http://localhost:{settings.API_PORT}"
BASE_URI = settings.PERFORMANCE_SERVICE_BASE_URL

def __init__(self, ctx: Context) -> None:
self.ctx = ctx
Expand Down
2 changes: 1 addition & 1 deletion app/repositories/scores.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class ScoresRepo:
BASE_URI = f"http://localhost:{settings.API_PORT}"
BASE_URI = settings.PERFORMANCE_SERVICE_BASE_URL

def __init__(self, ctx: Context) -> None:
self.ctx = ctx
Expand Down
2 changes: 1 addition & 1 deletion app/repositories/sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


class SessionsRepo:
BASE_URI = f"http://localhost:{settings.API_PORT}"
BASE_URI = settings.PERFORMANCE_SERVICE_BASE_URL

def __init__(self, ctx: Context) -> None:
self.ctx = ctx
Expand Down
2 changes: 1 addition & 1 deletion app/repositories/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class StatsRepo:
BASE_URI = f"http://localhost:{settings.API_PORT}"
BASE_URI = settings.PERFORMANCE_SERVICE_BASE_URL

def __init__(self, ctx: Context) -> None:
self.ctx = ctx
Expand Down
2 changes: 1 addition & 1 deletion app/repositories/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class UsersRepo:
BASE_URI = f"http://localhost:{settings.API_PORT}"
BASE_URI = settings.PERFORMANCE_SERVICE_BASE_URL

def __init__(self, ctx: Context) -> None:
self.ctx = ctx
Expand Down

0 comments on commit d007ad0

Please sign in to comment.