启动celery命令

1
celery worker -A celery_task -l info -P eventlet

selery

在django中使用restful风格做开发时,发现都不能发送

在使用post方法的时候,因为我的celery后台一直是启动的,所以不运行task中封装的函数,
然后一直在找解决办法,于是我重启celery后台,会出现一个错误
selery

该错误描述:

1
TypeError: wrap_socket() got an unexpected keyword argument '_context'

于是找了解决办法,换个启动命令

request包的request.post发送后,传不回数据

所以,在改变服务器启动方法不要用eventlet,加个参数

1
celery worker -A mydjango -l info -P=solo

评论





载入天数...载入时分秒...

Blog content follows the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) License

Use WZH as theme, total visits times