globals.py 555 B

123456789101112131415161718192021222324252627
  1. import threading
  2. # 全局变量来控制推理线程
  3. import redis
  4. import time
  5. # 连接到 Redis 服务器
  6. redis_client = redis.StrictRedis(host='localhost', port=5050, db=0,decode_responses=True)
  7. inference_thread = None
  8. stop_event = threading.Event()
  9. lock=threading.Lock()
  10. ###############焊接考核
  11. #为True时,表示某一步骤完成,并保存图片post
  12. step1=False
  13. step2=False
  14. step3=False
  15. step4=False
  16. step5=False
  17. step6=False
  18. # 压缩氧
  19. # 1 = 外壳去掉
  20. # 2 = 脖带戴好
  21. # 3 = 咬口具
  22. # 4 = 氧气瓶开启
  23. # 5 = 补气
  24. # 6 = 带鼻夹