Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbins228 committed Nov 7, 2023
1 parent 3e1a58b commit 7b7fb6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/controller/queuejob/queuejob_controller_ex.go
Original file line number Diff line number Diff line change
Expand Up @@ -976,17 +976,17 @@ func calculateRequiredResources(namespace string, appwrapperName string, request
memoryRegex := regexp.MustCompile(`memory (\d+(\.\d+)?)`)
gpuRegex := regexp.MustCompile(`GPU (\d+)`)

// requested resources values //
// Requested resources values //
requestedCPU := cpuRegex.FindStringSubmatch(requestedResources)
requestedMemory := memoryRegex.FindStringSubmatch(requestedResources)
requestedGPU := gpuRegex.FindStringSubmatch(requestedResources)

// available resources values //
// Available resources values //
availableCPU := cpuRegex.FindStringSubmatch(totalAvailable)
availableMemory := memoryRegex.FindStringSubmatch(totalAvailable)
availableGPU := gpuRegex.FindStringSubmatch(totalAvailable)

// convert values to float //
// Convert values to float //
requestedCPUValue, err := strconv.ParseFloat(requestedCPU[1], 64)
if err != nil {
klog.Warningf("Error parsing CPU value: ", err)
Expand Down

0 comments on commit 7b7fb6b

Please sign in to comment.