Add human operation time log

This commit is contained in:
BlankCheng
2024-01-29 21:42:16 +08:00
parent 460507b5c3
commit 284d6fb379
20 changed files with 958 additions and 76 deletions

View File

@@ -63,7 +63,8 @@ class PythonController:
Executes a python command on the server.
It can be used to execute the pyautogui commands, or... any other python command. who knows?
"""
command_list = ["python", "-c", self.pkgs_prefix.format(command=command)]
# command_list = ["python", "-c", self.pkgs_prefix.format(command=command)]
command_list = ["python3", "-c", self.pkgs_prefix.format(command=command)]
payload = json.dumps({"command": command_list, "shell": False})
headers = {
'Content-Type': 'application/json'

View File

@@ -285,7 +285,8 @@ class DesktopEnv(gym.Env):
logger.info("Emulator started.")
logger.info("Get meta info of the VM...")
self.vm_platform = self.controller.get_vm_platform()
# self.vm_platform = self.controller.get_vm_platform()
self.vm_platform = "Darwin"
self.vm_screen_size = self.controller.get_vm_screen_size()
print(self.vm_screen_size)

View File

@@ -600,6 +600,8 @@ def download_file():
data = request.json
url = data.get('url', None)
path = data.get('path', None)
print(url, path)
print("*" * 100)
if not url or not path:
return "Path or URL not supplied!", 400