Hey Pete,

Thanks for the reply.  Surprisingly enough, I resolved this issue by 
letting god handle the log file.  In other words, I changed my god config 
like so:

  w.start     = "bundle exec rake resque:scheduler 
>> /home/rails/project_a/shared/log/scheduler.log 2>&1"
to
  w.start     = "bundle exec rake resque:scheduler"
  w.log       = "#{SHARED_PATH}/log/scheduler.log"

Not sure why that fixed it.  Probably has something to do with Bash/Unix 
process intricacies that I don't fully understand.

-- C

On Friday, March 16, 2012 8:42:55 PM UTC-4, Pete Shima wrote:
>
>  Hi Chris, 
>
> I'd guess the issue is that god is starting your sh shell and the shell is 
> starting ruby, rather than god.  I am not sure how god deals with processes 
> like these but I'd guess the issue not to be with bundle exec.
>
> I'd suggest running resque scheduler directly without wrapping in sh -c if 
> your environment allows.
>
> here's my w.start command that is confirmed to be working correctly under 
> bundle exec
>
> w.start = "#{BIN_PATH}/bundle exec rake -f #{RAILS_ROOT}/Rakefile 
> resque:scheduler"
>
> Hope this helps.
>
> On Friday, March 16, 2012 at 11:36 AM, Christopher J. Bottaro wrote:
>
> Hello,
>
> I'm having a problem with god trying to watch a non-daemon process that is 
> started by "bundle exec".
>
> God starts the process just fine, as seen by ps:
>
> 6856 ?        Ss     0:00 sh -c bundle exec rake resque:scheduler >> 
> /home/rails/project_a/shared/log/scheduler.log 2>&1
> 6860 ?        Sl     0:23 ruby 
> /home/rails/project_a/shared/bundle/ruby/1.9.1/bin/rake resque:scheduler
>
> The problem is that god is monitoring the first process (6856), so that a 
> "god stop" or "god restart" nukes the first process, but the second one 
> remains.
>
> Any ideas?  Thanks for the help.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "god.rb" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/god-rb/-/W83Awd_b3mkJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/god-rb?hl=en.
>  
>  
>  

-- 
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/god-rb/-/2Z-Hc5KP7_sJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/god-rb?hl=en.

Reply via email to