This commit is contained in:
dongchangxi committed 2025-06-22 01:46:14 +08:00
1 parent c76eae5d39
commit 2280e59398
9 files changed
+12168 -19

No files matched your search

File diff suppressed because it is too large. Load diff
+7 -6
View File
@@ -142,7 +142,8 @@ def checkIsFinish(driver, pid, orderId,styleNumber):
print(f"pid={pid},orderid={orderId},style_number:{styleNumber} 任务处理完成,深度图已上传到OSS")
#推入到队列中
r = utils.create_redis_connection()
r.lpush('model:badge_cartoon_build', json.dumps({'pid': pid, 'order_id': orderId, 'style_number': styleNumber}))
if pid > 1000:
r.lpush('model:badge_cartoon_build', json.dumps({'pid': pid, 'order_id': orderId, 'style_number': styleNumber}))
driver.quit()
return True
@@ -206,12 +207,12 @@ if __name__ == '__main__':
r = utils.create_redis_connection()
while True:
try:
if r.llen('model:badge_cartoon') == 0:
print('队列为空,等待10秒')
time.sleep(10)
continue
# if r.llen('model:badge_cartoon') == 0:
# print('队列为空,等待10秒')
# time.sleep(10)
# continue
info = r.lpop('model:badge_cartoon')
info = r.spop('model:badge_cartoon')
if info is None:
print('队列为空,等待10秒')
time.sleep(10)
Binary file not shown.