Dylan,

I was having a similar problem, and for me it worked if I always
monitor my tasks before stopping them.  So:

god start foo
god stop foo

... would fail, but:

god start foo
god monitor foo
god stop foo

works fine.  Maybe you're having the same issue?

Erik

On Fri, Apr 24, 2009 at 11:12 AM, Dylan Vaughn <[email protected]> wrote:
>
> Small correction below...missed one part of simplifying my actual call
> for the purpose of this post:
>
> On Fri, Apr 24, 2009 at 10:02 AM, dylan <[email protected]> wrote:
>>
>> Hello,
>>
>> I'm using the latest god gem and am having a hard time getting god to
>> stop watches where there is no pid file.  I am running ubuntu.  Here
>> is an example:
>>
>> God.watch do |w|
>>  w.name = "poller"
>>  w.interval = 30.seconds
>>  w.start = "RAILS_ENV=development ruby /home/dylan/app/lib/poller.rb
>>>> /home/dylan/app/log/poller.log 2>&1"
>>  ...rest of the normal transitions, etc
>> end
>>
>> When I run this with god, it does start up the process correctly - ps
>> shows me this:
>>
>> dy...@dylan:~/app$ ps -ef | grep poller
>> dylan    14792     1  0 09:46 ?        00:00:00 sh -c
>> RAILS_ENV=development ruby /home/dylan/app/lib/poller.rb >> /home/
>> dylan/app/log/poller.log 2>&1
>> dylan    14793 14792 12 09:46 ?        00:00:03 ruby /home/dylan/app/
>> lib/daemons/dispatcher.rb
>
> This actual should be (for the example):
>
> dylan    14793 14792 12 09:46 ?        00:00:03 ruby /home/dylan/app/poller.rb
>
>>
>> So this looks like god wraps the call through 'sh'?  Then when I do:
>> god terminate or god stop poller, and then do ps, I get this:
>>
>> dylan    14793     1  3 09:46 ?        00:00:03 ruby /home/dylan/app/
>> lib/poller.rb
>>
>> So it looks like the 'sh' wrapper call was terminated by god but not
>> the child process it spawned (which is the actual process I'm
>> interested in).
>>
>> Am I doing something wrong in my start command?  I have not been able
>> to get the 'auto-daemonizing' functionality to work properly due to
>> this issue.
>>
>> Thanks in advance for any tips,
>>
>> Dylan
>> >
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
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