安装 Celery/Redis 以在另一台服务器上运行任务的正确方法是什么?

发布于 2024-12-19 03:51:32 字数 51 浏览 3 评论 0原文

Web 服务器本身运行 django。我希望网络服务器将实际任务工作委托给另一台服务器。

The web server itself runs django. I would like the web server to delegate the actual tasks work to another server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寻梦旅人 2024-12-26 03:51:32

首先,在远程服务器上设置 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文