|
|
|
|
@ -114,11 +114,13 @@ def requestApiToUpdateSliceStatus(versionId, downloadCounts):
@@ -114,11 +114,13 @@ def requestApiToUpdateSliceStatus(versionId, downloadCounts):
|
|
|
|
|
res = requests.post(api_url, timeout=60) # 60秒超时 |
|
|
|
|
if res.status_code != 200: |
|
|
|
|
log(f'状态变更请求失败, res={res.text}') |
|
|
|
|
sendWechatMessage("18950403426", f"切片状态变更请求失败, res={res.text}") |
|
|
|
|
return False |
|
|
|
|
log(f'状态变更请求成功, res={res.text}') |
|
|
|
|
#判断返回的code是否是1000 |
|
|
|
|
if res.json()["code"] != 1000: |
|
|
|
|
log(f'状态变更请求失败, res={res.text}') |
|
|
|
|
sendWechatMessage("18950403426", f"切片状态变更请求失败, res={res.text}") |
|
|
|
|
return False |
|
|
|
|
log(f'状态变更请求成功, res={res.text}') |
|
|
|
|
return True |
|
|
|
|
@ -691,3 +693,19 @@ def findBpyModule():
@@ -691,3 +693,19 @@ def findBpyModule():
|
|
|
|
|
raise FileNotFoundError(error_msg) |
|
|
|
|
|
|
|
|
|
return blender_bin_path |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#发起企业微信通知 |
|
|
|
|
def sendWechatMessage(tel,content): |
|
|
|
|
# 发起企业微信通知 |
|
|
|
|
api_url = f"https://mp.api.suwa3d.com/api/qyNotify" |
|
|
|
|
data = { |
|
|
|
|
"message": content, |
|
|
|
|
"userId": tel |
|
|
|
|
} |
|
|
|
|
res = requests.post(api_url, data=json.dumps(data)) |
|
|
|
|
if res.status_code != 200: |
|
|
|
|
log(f"发起企业微信通知失败, res={res.text}") |
|
|
|
|
return False |
|
|
|
|
return True |