Commit 88a59fb2 authored by joliu's avatar joliu

修改代码版本为执行多条任务指令

parent d11e5a0c
...@@ -25,7 +25,7 @@ def findTask(): ...@@ -25,7 +25,7 @@ def findTask():
conn = sqlite3.connect("task.db") conn = sqlite3.connect("task.db")
cursor = conn.cursor() cursor = conn.cursor()
cursor.execute(sql) cursor.execute(sql)
data = cursor.fetchone() data = cursor.fetchall()
if data is None: if data is None:
(status, output) = (-1, 'database is empty!') (status, output) = (-1, 'database is empty!')
else: else:
......
...@@ -6,7 +6,7 @@ message = sys.argv[2] ...@@ -6,7 +6,7 @@ message = sys.argv[2]
# message = "controller&clear&niubi" # message = "controller&clear&niubi"
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", port)) s.connect(("192.168.12.19", port))
s.sendall(message.encode()) s.sendall(message.encode())
response = s.recv(1024).decode() response = s.recv(1024).decode()
print(response) print(response)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment