Browse Source

不进行尺寸的处理的脚本

master
dongchangxi 10 months ago
parent
commit
0b9b2eb4f0
  1. 20
      no_resize.py

20
no_resize.py

@ -126,7 +126,24 @@ def down_obj_fromoss(pid, print_type=1, order_id=None,download_flag="print_build
def make3d4print_task(orderId): def make3d4print_task(r):
try:
if r.llen('model:noresize') == 0:
print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()), '暂无可处理的数据')
time.sleep(5)
except Exception as e:
time.sleep(5)
print(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()), 'redis连接异常,重新连接')
r = redis.Redis(host='106.14.158.208', password='kcV2000', port=6379, db=6)
return
orderId = r.lpop('model:noresize')
if orderId is None: return
if type(orderId) != str:
orderId = orderId.decode('utf-8')
# orderId = 56077
res = getPidFromOrderId(orderId)
res = getPidFromOrderId(orderId) res = getPidFromOrderId(orderId)
if res == -1: if res == -1:
print("查询打印订单信息失败,重新开启进程") print("查询打印订单信息失败,重新开启进程")
@ -194,7 +211,6 @@ if __name__ == '__main__':
workdir = 'E:\\' workdir = 'E:\\'
else: else:
workdir = '/data/datasets/' workdir = '/data/datasets/'
blenderbin = find_blender_bin_path()
r = create_redis_connection() r = create_redis_connection()
#E:\\complate/objs/147852_54579/ #E:\\complate/objs/147852_54579/

Loading…
Cancel
Save