From 4706d884e48899d6315abc73ec89e6dcb2db3165 Mon Sep 17 00:00:00 2001 From: db <1301189887@qq.com> Date: Fri, 29 Nov 2024 10:12:23 +0800 Subject: [PATCH] fix comments --- src/CraneCtld/CtldGrpcServer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/CraneCtld/CtldGrpcServer.cpp b/src/CraneCtld/CtldGrpcServer.cpp index 5033ef774..fda7b2d66 100644 --- a/src/CraneCtld/CtldGrpcServer.cpp +++ b/src/CraneCtld/CtldGrpcServer.cpp @@ -977,6 +977,11 @@ CtldServer::SubmitTaskToScheduler(std::unique_ptr task) { g_task_scheduler->SubmitTaskAsync(std::move(task)); return {std::move(future)}; } + + if (result.has_error()) { + CRANE_DEBUG("Task submission failed. Reason: {}.", result.error().second); + return result::fail(result.error().second); + } } } // namespace Ctld