-
Notifications
You must be signed in to change notification settings - Fork 179
Remove Lita::Daemon #62
Comments
I give this a vote of 🍦. It makes the init/runit/whatever stuff in the Chef cookbook easier to detect startup failures (thus you can ignore my comment on #61). I might go ahead and change it over that way now just to get ahead of the curve. |
Ok, while I agree with a lot of the commentary in those it would be fantastic to have some reference material to implement the changes… |
Hi @jufemaiz - Here are a couple of ways to do it ...
That command should: A. put lita into the background If you are looking to start it some other way, (i.e. upstart, systemd) I can probably help with that too. Just let me know. |
I'll also likely be adding a systemd example to the docs site in the near future. |
Hi guys, thanks so much for the direction! Will see how I go this morning (AEST) and get back to you! |
Ok, we're gradually getting there. Dumb question, what would prevent the PID file from being created/updated? Self solving: --log-file and --pid-file flags are not used if not using the daemon, so we need to take care of catching the pid and creating the lita.pid file ourselves. |
I'd really recommend not trying to implement daemonization yourself. Something will inevitably go wrong. If it were me, I'd use 1) systemd for any OS that uses it (almost everything now) 2) runit for anything still using SysV init. |
I was sort of thinking this when it was first proposed, but wasn't totally sure and unfortunately didn't say no. Daemonization logic is not an application concern and should not be handled in Ruby code by Lita. There are plenty of process management tools available to do this for arbitrary processes without needing the application itself to be aware of how it's being run.
Lita::Daemon
should emit a deprecation warning in Lita 4 and should be removed in Lita 5.Further reading: http://www.mikeperham.com/2014/09/22/dont-daemonize-your-daemons/
The text was updated successfully, but these errors were encountered: