From b72a2a9d1d9caf9c53af12173c2f83ec7c25302f Mon Sep 17 00:00:00 2001 From: db <1301189887@qq.com> Date: Tue, 3 Dec 2024 17:39:30 +0800 Subject: [PATCH] add enum type --- src/CraneCtld/TaskScheduler.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/CraneCtld/TaskScheduler.cpp b/src/CraneCtld/TaskScheduler.cpp index 2f8b5911..a0ec0222 100644 --- a/src/CraneCtld/TaskScheduler.cpp +++ b/src/CraneCtld/TaskScheduler.cpp @@ -2776,11 +2776,8 @@ CraneErr TaskScheduler::AcquireTaskAttributes(TaskInCtld* task) { } CraneErr TaskScheduler::CheckTaskValidity(TaskInCtld* task) { - if (!CheckIfTimeLimitIsValid(task->time_limit)) { - CRANE_TRACE("Time-limit {} reached the user's limit", - absl::FormatDuration(task->time_limit)); + if (!CheckIfTimeLimitIsValid(task->time_limit)) return CraneErr::kInvalidTimeLimit; - } // Check whether the selected partition is able to run this task. std::unordered_set avail_nodes;