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

1

2

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.

Equivoque answered 22/6, 2011 at 13:43 Comment(0)
H
3

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.

Hudson answered 22/6, 2011 at 18:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.