It has been working pretty well so far, but it hasn't been used in a
production environment yet.

How is it different from the way Passenger uses the restart file?

-Cory

On Jul 7, 10:54 am, AndrewO <[email protected]> wrote:
> I'm looking to do the same thing.  Looking at your example, it appears
> that you create the file and then check the mod time, which is
> different from most of the other utilities I've seen that use a
> restart file (e.g. Passenger).  Was there a particular reason you
> chose to do it that way or is it just personal preference?
>
> Also, has this worked well for you?
>
> Thanks,
> Andrew
>
> On Jun 17, 7:01 pm, bantic <[email protected]> wrote:
>
>
>
> > Hi, I created a custom condition FileTouched like 
> > so:http://gist.github.com/442896
>
> > I am using god to monitor my resque workers, and I wanted to kill off
> > those workers after a deploy (and let god start them again), but I ran
> > into some trouble because I am starting god as root (sudo service god
> > start) but deploying as a less privileged user. I wanted to avoid
> > using sudo, so I wrote this condition and added the following snippet
> > to my resque.god (which otherwise is more-or-less identical to the
> > example one in the github 
> > repo:http://github.com/defunkt/resque/blob/master/examples/god/resque.god)
>
> >   w.restart_if do |restart|
> >     restart.condition(:file_touched) do |c|
> >       c.path = "#{rails_root}/tmp/resque_restart.txt"
> >     end
> >   end
>
> > I haven't used god much before, and never written a custom condition
> > for it, so I wanted to ask whether this approach looks workable.
>
> > thanks,
> > Cory

-- 
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