mirror of
https://github.com/wassname/ray.git
synced 2026-07-11 04:59:21 +08:00
Rename UpdateResource due to conflict with Windows (#6205)
* Rename UpdateResource due to conflict with Windows * Rename UpdateResource_ to UpdateResourceCapacity
This commit is contained in:
@@ -762,8 +762,8 @@ void SchedulingResources::Acquire(const ResourceSet &resources) {
|
||||
resources_available_.SubtractResourcesStrict(resources);
|
||||
}
|
||||
|
||||
void SchedulingResources::UpdateResource(const std::string &resource_name,
|
||||
int64_t capacity) {
|
||||
void SchedulingResources::UpdateResourceCapacity(const std::string &resource_name,
|
||||
int64_t capacity) {
|
||||
const FractionalResourceQuantity new_capacity = FractionalResourceQuantity(capacity);
|
||||
const FractionalResourceQuantity ¤t_capacity =
|
||||
resources_total_.GetResource(resource_name);
|
||||
|
||||
@@ -506,7 +506,7 @@ class SchedulingResources {
|
||||
/// \param resource_name: Name of the resource to be modified
|
||||
/// \param capacity: New capacity of the resource.
|
||||
/// \return Void.
|
||||
void UpdateResource(const std::string &resource_name, int64_t capacity);
|
||||
void UpdateResourceCapacity(const std::string &resource_name, int64_t capacity);
|
||||
|
||||
/// \brief Delete resource from total, available and load resources.
|
||||
///
|
||||
|
||||
@@ -568,7 +568,7 @@ void NodeManager::ResourceCreateUpdated(const ClientID &client_id,
|
||||
const std::string &resource_label = resource_pair.first;
|
||||
const double &new_resource_capacity = resource_pair.second;
|
||||
|
||||
cluster_schedres.UpdateResource(resource_label, new_resource_capacity);
|
||||
cluster_schedres.UpdateResourceCapacity(resource_label, new_resource_capacity);
|
||||
if (client_id == local_client_id) {
|
||||
local_available_resources_.AddOrUpdateResource(resource_label,
|
||||
new_resource_capacity);
|
||||
|
||||
Reference in New Issue
Block a user