Skip to content

Commit

Permalink
bugfix vcpu and memory cal
Browse files Browse the repository at this point in the history
  • Loading branch information
Signorini committed Jan 26, 2019
1 parent 1d46de9 commit 6694ef2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/services/hooks/aws.py
Expand Up @@ -28,8 +28,8 @@ def cpuAndMemoryByInstanceType(obj, conn):

if vcpus and memory:
data = {
'cpu': re.search(r'([0-9]*)', vcpus).group(),
'memory': re.search(r'([0-9\.]*)', memory).group(),
'cpu': int(re.search(r'([0-9]*)', vcpus).group()),
'memory': float(re.search(r'([0-9\.]*)', memory).group()),
}

CacheMemory.set(instance, data)
Expand Down
4 changes: 2 additions & 2 deletions app/services/hooks/azure.py
Expand Up @@ -92,8 +92,8 @@ def cpuAndMemoryByInstanceType(obj, conn):

if vcpus and memory:
data = {
'cpu': vcpus,
'memory': memory,
'cpu': int(vcpus),
'memory': float(memory),
}

CacheMemory.set(instance, data)
Expand Down

0 comments on commit 6694ef2

Please sign in to comment.