Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions Framework/install_handler/long_poll_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import random
import httpx
import inspect
import platform
from colorama import Fore
from Framework.install_handler.route import Response, services
from Framework.install_handler.utils import debug, send_response, read_node_id, generate_services_list
Expand Down Expand Up @@ -39,8 +40,6 @@ async def on_message(self, message: Response) -> None:
elif action == "system_info":
if debug: print(f"[installer] Received system_info request")
try:
# Get formatted system info
print("system info")
system_info_response = await get_formatted_system_info()
# Send the response to server
await send_response({
Expand Down Expand Up @@ -126,7 +125,16 @@ async def on_message(self, message: Response) -> None:
print(f"[installer] Function not found for {message.value.item.name}")
return
await func()

elif action == "group_status":
services_list = [i for i in services if i["category"] == message.value.item.category][0]['services']
functions = [i["status_function"] for i in services_list if i["status_function"]]
for func in functions:
await func()
elif action == "group_install":
services_list = [i for i in services if i["category"] == message.value.item.category][0]['services']
functions = [i["install_function"] for i in services_list if i["install_function"]]
for func in functions:
await func()
except Exception as e:
traceback.print_exc()

Expand Down
Loading
Loading