Skip to content

Commit

Permalink
Remove fastapi logic from the db
Browse files Browse the repository at this point in the history
  • Loading branch information
jhj0517 committed Nov 18, 2024
1 parent 3f981a2 commit 650596b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/db/task/dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

@handle_database_errors
def add_task_to_db(
session=Depends(get_db_session),
session,
status=TaskStatus.QUEUED,
task_type=None,
language=None,
Expand Down Expand Up @@ -38,7 +38,7 @@ def add_task_to_db(
def update_task_status_in_db(
identifier: str,
update_data: Dict[str, Any],
session: Session = Depends(get_db_session),
session: Session,
):
"""
Update task status and attributes in the database.
Expand All @@ -60,7 +60,7 @@ def update_task_status_in_db(

@handle_database_errors
def get_task_status_from_db(
identifier, session: Session = Depends(get_db_session)
identifier, session: Session
):
"""Retrieve task status from db"""
task = session.query(Task).filter(Task.uuid == identifier).first()
Expand All @@ -71,7 +71,7 @@ def get_task_status_from_db(


@handle_database_errors
def get_all_tasks_status_from_db(session: Session = Depends(get_db_session)):
def get_all_tasks_status_from_db(session: Session):
"""Get all tasks from db"""
columns = [Task.uuid, Task.status, Task.task_type]
query = session.query(*columns)
Expand Down

0 comments on commit 650596b

Please sign in to comment.