开发者

Checking if the Faye server exists before running it for my Rails app

开发者 https://www.devze.com 2023-03-15 03:13 出处:网络
In relation to a previous question of mine found here: Autorun the Faye server when I start the Rails server

In relation to a previous question of mine found here:

Autorun the Faye server when I start the Rails server

I am now running the Faye server whenever I start Rails. However, this means it is trying to run the Faye server when I run the Rails server, the Rails console, or anything else Rails related.

Is there a way to check if the Faye server is already running? And if it is, 开发者_开发技巧not attempt to run a new one? Or maybe this isn't the best approach, I welcome all ideas and tips.


You can use the DaemonController library. It will enable you to auto-start services with your Rails app, starting them if they aren't already started.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号