Skip to content

Commit 12fe4aa

Browse files
committed
fix: backend format
1 parent 66edaf0 commit 12fe4aa

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

backend/app/services/image_service.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ def get_distribox_image_list():
2020
image_info_json = json.loads(image_info.stdout)
2121
image_list.append(ImageRead(
2222
name=image_info_json["filename"].split("/")[-1],
23-
virtual_size=round(image_info_json["virtual-size"] / (1024 ** 3), 2),
24-
actual_size=round(image_info_json["actual-size"] / (1024 ** 3), 2)
23+
virtual_size=round(
24+
image_info_json["virtual-size"] / (1024 ** 3), 2),
25+
actual_size=round(
26+
image_info_json["actual-size"] / (1024 ** 3), 2)
2527
))
2628
return image_list

backend/app/telemetry/monitor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def _update_loop(self):
8686
self.cpu["percent_used_per_vm"] = []
8787
for vm_counter_t1 in cpu_usage_t1["per_vm_counter"]:
8888
vm_counter_t2 = next(
89-
(vm for vm in cpu_usage_t2["per_vm_counter"] if vm["id"] == vm_counter_t1["id"]),
89+
(vm for vm in cpu_usage_t2["per_vm_counter"]
90+
if vm["id"] == vm_counter_t1["id"]),
9091
None)
9192
if vm_counter_t2 is None:
9293
continue

0 commit comments

Comments
 (0)