diff --git a/project_usage_exporter.py b/project_usage_exporter.py index 483adcc..62e072c 100755 --- a/project_usage_exporter.py +++ b/project_usage_exporter.py @@ -614,8 +614,8 @@ def main(): try: weight_response = requests.get(args.weight_update_endpoint) current_weights = { - x['resource_set_timestamp']: {'memory_mb': {y['value']: y['weight'] for y in x['ram_weights']}, - 'vcpus': {y['value']: y['weight'] for y in x['vcpu_weights']}} for + x['resource_set_timestamp']: {'memory_mb': {y['value']: y['weight'] for y in x['mb_usage']}, + 'vcpus': {y['value']: y['weight'] for y in x['vcpus']}} for x in weight_response.json()} logging.info("Updated credits weights, new weights: " + str(current_weights)) exporter.update_weights(current_weights)