feat: add placeholder backend #7

Merged
pufereq merged 24 commits from feat/add-placeholder-backend into develop 2025-08-26 17:56:00 +00:00
9 changed files with 265 additions and 108 deletions
Showing only changes of commit d8405fa363 - Show all commits

View File

@@ -25,7 +25,7 @@ class BackendServer:
"platform": "windows 11",
"cpu_info": "i7",
},
"polled": {"cpu_usage": 0, "mem_usage": 0},
"polled": {"cpu_usage": 0, "ram_usage": 0},
"ondemand": {},
}
}
@@ -38,8 +38,8 @@ class BackendServer:
def _poll_loop(self) -> None:
while self.running:
for client in self.clients.values():
client["polled"]["cpu"] = round(rn.uniform(0, 100), 1)
client["polled"]["ram"] = round(rn.uniform(0, 100), 1)
client["polled"]["cpu_usage"] = round(rn.uniform(0, 100), 1)
client["polled"]["ram_usage"] = round(rn.uniform(0, 100), 1)
time.sleep(1)
def get_client_data(