Commit 4919ed8b by lei

1

parent 9d4c4bd9
...@@ -309,6 +309,8 @@ class ToWork: ...@@ -309,6 +309,8 @@ class ToWork:
change_prompt = task['prompt'] change_prompt = task['prompt']
# 图片链接 # 图片链接
prompt_img = task['prompt_img'] prompt_img = task['prompt_img']
logger.info(task)
logger.info(task['type'] == 1)
logger.info(prompt_img) logger.info(prompt_img)
if task['type'] == 1 and prompt_img and len(json.loads(prompt_img)): if task['type'] == 1 and prompt_img and len(json.loads(prompt_img)):
logger.info('带图片任务') logger.info('带图片任务')
......
import socket import socket
import requests import requests
import json
# 获取本机计算机名称 task = {
hostname = socket.gethostname() 'type': 1,
# 获取本机ip 'prompt_img': json.dumps(['1111111'])
ip = socket.gethostbyname(hostname) }
print(ip) prompt_img = task['prompt_img']
ip = 'http://' + ip if task['type'] == 1 and prompt_img and len(json.loads(prompt_img)):
res = requests.get(ip) print('可以执行')
print(res)
'192.168.1.51' '192.168.100.225'
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