Skip to content

Commit 83200f8

Browse files
Refactor code formatting and enhance error handling in orchestration tasks
1 parent e4d1da7 commit 83200f8

File tree

4 files changed

+211
-12
lines changed

4 files changed

+211
-12
lines changed

src/backend/v3/api/router.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,10 +307,10 @@ async def process_request(
307307

308308
async def run_orchestration_task():
309309
await OrchestrationManager.get_current_or_new_orchestration(
310-
user_id=user_id,
311-
team_config=team_config,
312-
team_switched=False,
313-
)
310+
user_id=user_id,
311+
team_config=team_config,
312+
team_switched=False,
313+
)
314314
await OrchestrationManager().run_orchestration(user_id, input_task)
315315

316316
background_tasks.add_task(run_orchestration_task)
@@ -337,12 +337,11 @@ async def run_orchestration_task():
337337

338338
@app_v3.post("/plan_approval")
339339
async def plan_approval(human_feedback: messages.PlanApprovalResponse, request: Request):
340-
341340
authenticated_user = get_authenticated_user_details(request_headers=request.headers)
342341
user_id = authenticated_user["user_principal_id"]
343342
if not user_id:
344343
raise HTTPException(
345-
status_code=401, detail="Missing or invalid user information"
344+
status_code=401, detail="Missing or invalid user information"
346345
)
347346
# Set the approval in the orchestration config
348347
try:

src/backend/v3/models/messages.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,3 @@ class WebsocketMessageType(str, Enum):
215215
FINAL_RESULT_MESSAGE = "final_result_message"
216216
TIMEOUT_NOTIFICATION = "timeout_notification"
217217
ERROR_MESSAGE = "error_message"
218-

src/backend/v3/orchestration/orchestration_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async def callback(
9999
except Exception as e:
100100
logger = logging.getLogger(f"{__name__}.OrchestrationManager")
101101
logger.error(f"Error in streaming agent response callback: {e}")
102-
102+
103103
return callback
104104

105105
@classmethod

0 commit comments

Comments
 (0)