Skip to content

Commit 517740e

Browse files
committed
quality gate blocking IO fix
1 parent b55a87a commit 517740e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

backend/app/services/kubernetes_service.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import json
33
import os
44
from datetime import datetime, timedelta, timezone
5+
from pathlib import Path
56
from typing import Any, Dict, List, Set
67

78
from app.config import get_settings
@@ -155,9 +156,8 @@ async def create_execution_pod(
155156
pod_name = f"execution-{execution_id}"
156157

157158
try:
158-
entrypoint_script_path = "app/scripts/entrypoint.py"
159-
with open(entrypoint_script_path, "r") as f:
160-
entrypoint_code = f.read()
159+
entrypoint_script_path = Path("app/scripts/entrypoint.py")
160+
entrypoint_code = await asyncio.to_thread(entrypoint_script_path.read_text)
161161

162162
config_map_data["entrypoint.py"] = entrypoint_code
163163

0 commit comments

Comments
 (0)