安装 Celery/Redis 以在另一台服务器上运行任务的正确方法是什么?
Web 服务器本身运行 django。我希望网络服务器将实际任务工作委托给另一台服务器。
The web server itself runs django. I would like the web server to delegate the actual tasks work to another server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,在远程服务器上设置 Redis 服务器。更改 django 配置以连接到此服务器。
当您部署应用程序时,我建议使用 fabric 部署到您的 Web 服务器和工作服务器。它也应该处理重启逻辑。
First, setup your redis server on the remote server. Change your django configuration to connect to this server.
When you deploy your app, I recommend using fabric to deploy to your web server and your worker server. It should handle the restart logic as well.