celery 是否可以在启动时自动运行?
我有基于 django 和 celery 的 python 服务器。 每次计算机重新启动时,apache2 都会启动,因此我的服务器正在工作,但我必须手动重新启动 celery(转到我的项目目录并执行“python manage.py celeryd”)。生产的正确解决方案是什么?我的意思是,是否有可能将 celery 作为守护进程启动?
这里 http://github.com/ask/celery/tree /master/contrib/debian/init.d/ 我发现两个脚本看起来应该在 /etc/init.d/ 中,就像启动 apache2 的 apache2 脚本一样。但我把它们放在 /etc/init.d/ 中,我发现没有任何变化。
I have python server based on django and celery.
Each time computer restarts, apache2 starts so my server is working, BUT I have to restart celery manually (going to my project directory and executing "python manage.py celeryd"). What is the correct solution for production? I mean, is there a possibility to start celery as daemon?
Here http://github.com/ask/celery/tree/master/contrib/debian/init.d/ I found two scripts which looks like they should be in /etc/init.d/ like apache2 script that starts apache2. But I put them to /etc/init.d/ and as I see nothing changes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你应该看看 http://www.debian-administration.org/article/Making_scripts_run_at_boot_time_with_Debian
简而言之,使用
/etc/init.d
中的celeryd
脚本:You should take a look at http://www.debian-administration.org/article/Making_scripts_run_at_boot_time_with_Debian
In short, with the
celeryd
script in/etc/init.d
: