Skip to content

Commit

Permalink
fix: delete_sessions typo error (#2656)
Browse files Browse the repository at this point in the history
  • Loading branch information
agatha197 authored Aug 6, 2024
1 parent d976b96 commit 7a87f1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions src/ai/backend/manager/api/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -2149,9 +2149,11 @@ async def get_container_logs(
session_name,
owner_access_key,
allow_stale=True,
kernel_loading_strategy=KernelLoadingStrategy.MAIN_KERNEL_ONLY
if kernel_id is None
else KernelLoadingStrategy.ALL_KERNELS,
kernel_loading_strategy=(
KernelLoadingStrategy.MAIN_KERNEL_ONLY
if kernel_id is None
else KernelLoadingStrategy.ALL_KERNELS
),
)

if compute_session.status in DEAD_SESSION_STATUSES:
Expand Down
10 changes: 6 additions & 4 deletions src/ai/backend/manager/models/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,11 @@ def from_row(cls, graph_ctx: GraphQueryContext, row: Row) -> Optional[Group]:
created_at=row["created_at"],
modified_at=row["modified_at"],
domain_name=row["domain_name"],
total_resource_slots=row["total_resource_slots"].to_json()
if row["total_resource_slots"] is not None
else {},
total_resource_slots=(
row["total_resource_slots"].to_json()
if row["total_resource_slots"] is not None
else {}
),
allowed_vfolder_hosts=row["allowed_vfolder_hosts"].to_json(),
integration_id=row["integration_id"],
resource_policy=row["resource_policy"],
Expand Down Expand Up @@ -751,7 +753,7 @@ async def delete_sessions(
"""
from .session import SessionRow

stmt = sa.delet(SessionRow).where(SessionRow.group_id == group_id)
stmt = sa.delete(SessionRow).where(SessionRow.group_id == group_id)
await db_conn.execute(stmt)

@classmethod
Expand Down

0 comments on commit 7a87f1b

Please sign in to comment.