启动异步任务报错:No such file or directory: '\\tmp\\worker_ready_celery'

local model启动后无报错
请大佬们指点指点

python main.py dev celery
报错信息:
2024-11-25 09:58:42 Connected to sqla+sqlite:///D:\project_metahuman\maxkb\data\celery_task\celery_db.sqlite3
2024-11-25 09:58:42 Signal handler <function worker_ready at 0x000002BA583CA020> raised: FileNotFoundError(2, ‘No such file or directory’)
Traceback (most recent call last):
File “D:\project_metahuman\g-oksw0767-ai-rag-ai-know-\venv\Lib\site-packages\celery\utils\dispatch\signal.py”, line 276, in send
response = receiver(signal=self, sender=sender, **named)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “D:\project_metahuman\maxkb\apps\ops\celery\heatbeat.py”, line 17, in worker_ready
ready_path.touch()
File “D:\aconda\Lib\pathlib.py”, line 1108, in touch
fd = os.open(self, flags, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: ‘\tmp\worker_ready_celery’

检查一下你的D盘是否有tmp目录?

1 个赞

感谢 在D盘新建tmp目录后正常启动异步服务