This commit is contained in:
ddrwode
2026-03-02 00:40:21 +08:00
parent 0a7468799f
commit 57ee9a6cda
4 changed files with 106 additions and 48 deletions

View File

@@ -265,7 +265,10 @@ def task_list(request):
return api_error(http_status.HTTP_503_SERVICE_UNAVAILABLE, f"Worker {target_worker_id} 不在线")
req.worker_id = target_worker_id
task = task_dispatcher.create_task(req)
try:
task = task_dispatcher.create_task(req)
except ValueError as e:
return api_error(http_status.HTTP_409_CONFLICT, str(e))
send_fn = worker_manager.get_send_fn(target_worker_id)
if not send_fn: