# 在celery task 中 加入
# from multiprocessing import current_process
# current_process()._config={"semprefix":"/mp"}
@app.task
def create_task()
from multiprocessing import current_process
current_process()._config={"semprefix":"/mp"}
# ...do something...
return "hello world"
create_task.apply_async(
...
)
标签:current,None,task,...,process,Celery,Ansible,semprefix
From: https://www.cnblogs.com/snakej/p/17532021.html