Skip to content

Commit

Permalink
refactor dev and stable
Browse files Browse the repository at this point in the history
refactor socket server
  • Loading branch information
JE-Chen committed Nov 9, 2022
1 parent 0568927 commit f235135
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
16 changes: 12 additions & 4 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified autocontrol_driver/generate_autocontrol_driver_win.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion dev_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="je_auto_control_dev",
version="0.0.42",
version="0.0.43",
author="JE-Chen",
author_email="zenmailman@gmail.com",
description="auto testing",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys
import json
import socketserver
import sys
import threading

from je_auto_control.utils.executor.action_executor import execute_action
Expand All @@ -19,13 +19,9 @@ def handle(self):
else:
try:
execute_str = json.loads(command_string)
if execute_str is not None:
for execute_function, execute_return in execute_action(execute_str).items():
socket.sendto(str(execute_return).encode("utf-8"), self.client_address)
socket.sendto("\n".encode("utf-8"), self.client_address)
else:
socket.sendto("No_Return_Data".encode("utf-8"), self.client_address)
socket.sendto("\n".encode("utf-8"), self.client_address)
for execute_function, execute_return in execute_action(execute_str).items():
socket.sendto(str(execute_return).encode("utf-8"), self.client_address)
socket.sendto("\n".encode("utf-8"), self.client_address)
socket.sendto("Return_Data_Over_JE".encode("utf-8"), self.client_address)
socket.sendto("\n".encode("utf-8"), self.client_address)
except Exception as error:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="je_auto_control",
version="0.0.108",
version="0.0.109",
author="JE-Chen",
author_email="zenmailman@gmail.com",
description="auto testing",
Expand Down

0 comments on commit f235135

Please sign in to comment.