main
黄海 1 year ago
parent c496f0918a
commit 581019cc0b

@ -323,7 +323,7 @@ def finish_task(task_id, target_img_urls):
# 请求的地址
url = web_url + '/QingLong/HuiYa/finishTask'
# 要发送的数据,可以是字典形式
# 要发送的数据,字典形式
data = {
'task_id': task_id,
'enData': en_data,
@ -333,9 +333,9 @@ def finish_task(task_id, target_img_urls):
response = requests.post(url, data=data)
# 检查请求是否成功
if response.status_code == 200:
printf("成功完成数据回写!")
printf("完成数据回写!")
else:
printf('请求失败,状态码:' + str(response.status_code))
printf('失败,状态码:' + str(response.status_code))
if __name__ == '__main__':
@ -346,14 +346,12 @@ if __name__ == '__main__':
config = ConfigUtil.getConfig()
# 处理机编号
machine_id = config['system']['machine_id']
# webui 服务器地址
webui_address = config['webui']['webui_address']
# 文生图服务地址
txt2img_url = 'http://' + webui_address + config['webui']['txt2img_url']
# 图生图服务地址
img2img_url = 'http://' + webui_address + config['webui']['img2img_url']
# WEB服务器地址
web_url = config['webServer']['web_url']
# COMFYUI服务器地址
@ -379,5 +377,5 @@ if __name__ == '__main__':
time.sleep(1)
except Exception as err:
printf("发生异常,将休息1秒后重试..." + str(err))
time.sleep(1)
printf("发生异常,将休息5秒后重试..." + str(err))
time.sleep(5)

Loading…
Cancel
Save