Commit 4fee601a authored by 赵凯's avatar 赵凯 💬

fix

parent 738173be
......@@ -78,14 +78,23 @@ def tasksPatch(taskid):
'cookie': cookie
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response)
rst = json.loads(response.text)
print(response)
# Check if request was successful
if response.status_code == 200:
# Do something with the response data if needed
response_data = response.json()
print(response_data)
return response_data
else:
# Handle potential errors
response.raise_for_status()
print("debug - 执行异常,退出")
# print("任务开始执行...")
# if rst['code'] == -1:
# print("任务执行异常:" + rst['msg'])
# 集群部署任务
def taskMultiZone(taskid, target_k8):
cookie = getToken()
......
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