Commit 043eeac5 authored by 张晓彤's avatar 张晓彤

代码优化

parent 7d2bf082
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
import requests import requests
from tables import * from tables import *
with open(json_file) as f: with open(json_file) as f:
config = json.load(f) mysql_config = json.load(f)["mysql"]
# def redispatch_request(truck_id, excavator_id, unload_area_id): # def redispatch_request(truck_id, excavator_id, unload_area_id):
...@@ -98,7 +98,7 @@ def POST(truck_id): ...@@ -98,7 +98,7 @@ def POST(truck_id):
:param real_data: :param real_data:
:return: :return:
""" """
url_d = "http://" + config["host"] + ":8020/ht/api/dispatch/updateTemp?truckId=" + truck_id url_d = "http://" + mysql_config["host"] + ":8020/ht/api/dispatch/updateTemp?truckId=" + truck_id
res_d = requests.get(url_d) res_d = requests.get(url_d)
print(res_d.text) print(res_d.text)
return res_d.text return res_d.text
\ No newline at end of file
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