Skip to content

Commit

Permalink
Handle resource vs osdisk size
Browse files Browse the repository at this point in the history
Signed-off-by: adamrtalbot <[email protected]>
  • Loading branch information
adamrtalbot committed Dec 9, 2024
1 parent 8920652 commit e864b9e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class AzBatchService implements Closeable {
protected Double computeScore(int cpus, MemoryUnit mem, MemoryUnit disk, Map entry) {
def vmCores = entry.numberOfCores as int
double vmMemGb = (entry.memoryInMB as int) /1024
double vmDiskGb = (entry.resourceDiskSizeInMB as int) /1024
double vmDiskGb = entry.resourceDiskSizeInMB ? (entry.resourceDiskSizeInMB as int) / 1024 :entry.osDiskSizeInMB ? (entry.osDiskSizeInMB as int) / 1024 : 0.001

// If requested CPUs exceed available, disqualify
if( cpus > vmCores )
Expand Down

0 comments on commit e864b9e

Please sign in to comment.