-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working on rails 4 server running on daemon mode (-d) #165
Comments
Could you please tell which web server you're running Rails on? Thanks in advance. |
Indeed |
Server: thin The first lines of the server booting not in daemon mode:
The first lines of the log in daemon mode:
|
Have you tried flushing the logger? |
Interesting, "Setting up scheduled jobs..." appears in daemon mode, but not in "normal" mode. |
OK, I guess the thread for the scheduler is created before the |
Just tried with Webrick, seeing the same behavior. |
I tested on Rails 3.2.22 / OSX and seeing the same behaviour. Now, what I don't understand is why nobody did complain in all those years. One possible explanation would be that only a few people use |
It surprised me too not to find an issue here about it already, I guess |
I did found one or two posts on stackoverflow about it though. |
Could you please provide the links to those posts? |
I like runit http://www.mikeperham.com/2014/07/07/use-runit/ to run stuff. I never daemonize development servers. |
Another solution would be to use Unicorn and start the scheduler in an |
Just tried on OSX with Unicorn 4.9.0 and I will write a piece of documentation to close this issue. |
OK thanks for the support @jmettraux :) |
Tested with the simple example from the readme:
When starting the rails server with
rails server -d &
, rufus scheduled tasks won't fire up.I've found out that adding
s.join
at the end of the script fixes the issue when running as daemon, but when running just asrails server
the web server won't work, so I guess this is not intended to be used with rails.The text was updated successfully, but these errors were encountered: