Skip to content

Commit

Permalink
updated this thing
Browse files Browse the repository at this point in the history
  • Loading branch information
day-mon committed Apr 28, 2024
1 parent f0ef14a commit dc421fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion api/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

BASE_PATH = "/api/v1"

with open("pyproject.toml", "rb") as f:
# with open("pyproject.toml", "rb") as f:
with open(f"{os.path.dirname(os.path.realpath(__file__))}/../pyproject.toml", "rb") as f:
_META = tomli.load(f)

app = FastAPI(
Expand Down
9 changes: 4 additions & 5 deletions api/services/history/saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ async def save(self, games: list[SavedGame]) -> int:

@abstractmethod
async def unsaved(self,
games: list[DailyGameResponse],
model_name: str
) -> list[DailyGameResponse]:
games: list[DailyGameResponse],
model_name: str
) -> list[DailyGameResponse]:
"""
Checks if a game is already saved
:param list[DailyGameResponse] games: DailyGame object
Expand Down Expand Up @@ -95,7 +95,6 @@ async def unsaved(self, games: list[DailyGameResponse], model_name: str) -> list
return [game for game in games if game.id not in saved_game_ids]



class PostgresBasedGameSaver(GameSaver):
db: Postgres

Expand Down Expand Up @@ -141,7 +140,7 @@ async def save(self, games: list[SavedGame]) -> int:
return len(saved_games)

async def unsaved(self, games: list[DailyGameResponse], model_name: str
) -> list[DailyGameResponse]:
) -> list[DailyGameResponse]:
"""
Checks if a game is already saved
Expand Down
1 change: 0 additions & 1 deletion api/services/main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import asyncio

from history.history import HistoryService
from services.missed_games.missed_games import MissedGames
from loguru import logger
class ServiceManager:
def __init__(self):
Expand Down

0 comments on commit dc421fd

Please sign in to comment.