mirror of
https://github.com/wassname/ray.git
synced 2026-06-29 22:17:21 +08:00
[Core] Simplify logic in node manager class. (#11063)
Co-authored-by: 逗角 <yeqing.fyq@antfin.com>
This commit is contained in:
@@ -1814,13 +1814,8 @@ void NodeManager::HandlePrepareBundleResources(
|
||||
RAY_LOG(DEBUG) << "Request to prepare bundle resources is received, "
|
||||
<< bundle_spec.DebugString();
|
||||
auto prepared = PrepareBundle(cluster_resource_map_, bundle_spec);
|
||||
if (!prepared) {
|
||||
reply->set_success(false);
|
||||
send_reply_callback(Status::OK(), nullptr, nullptr);
|
||||
} else {
|
||||
reply->set_success(true);
|
||||
send_reply_callback(Status::OK(), nullptr, nullptr);
|
||||
}
|
||||
reply->set_success(prepared);
|
||||
send_reply_callback(Status::OK(), nullptr, nullptr);
|
||||
// Call task dispatch to assign work to the new group.
|
||||
TryLocalInfeasibleTaskScheduling();
|
||||
DispatchTasks(local_queues_.GetReadyTasksByClass());
|
||||
|
||||
Reference in New Issue
Block a user