hehe hello there :)

well i haven't really solved it. It seems to run, but in somewhat
unwatched stated. I noticed the jobs do get worked on etc, but
whenever I sudo terminate god, the job_runner task simply stays
alive.. which is somewhat distracting. If dj would create a .pid or
something on startup it would make it easier to maintain etc.. but ah
well... thanks for the answer :)

-J

On Jan 9, 4:14 am, woahdae <[email protected]> wrote:
> First of all, your config file specifies what user the program being
> watched will be running as, in this case job_runner.
>
> Then if god is running as root, it won't let you see the status unless
> you use sudo... not sure why it's not working, 'cuz it's obviously
> running. Guess you'll have to play with it (or more likely, already
> solved it by now or given up :-)
>
> I don't think that's a full answer, but it's something
>
> On Dec 27 2008, 6:40 pm, Jörg Battermann <[email protected]>
> wrote:
>
>
>
> > Hello there,
>
> > Quick Q: I have the god config below, use it to sudo god -c
> > config_file.god etc etc and god does show up somewhat under ps -waux:
>
> > root     30949  0.1  2.0  20792 11000 pts/0    Sl   02:32   0:00 /usr/
> > bin/ruby1.8 /usr/bin/god -c /home/rails/abc/current/config/
> > delayed_job.god
> > root     30952  0.0  0.0      0     0 pts/0    Z    02:32   0:00 [god]
> > <defunct>
>
> > ... but why is it running as root and not rails as specified in the
> > config and more importantly... whenever I do a (sudo) god status it
> > says 'The server is not available (or you do not have permissions to
> > access it)'??
>
> > However on a '(sudo) god log delayed_job_worker' I see this:
> > I [2008-12-28 02:37:58]  INFO: delayed_job_worker start: /home/rails/
> > abc/current/script/job_runner RAILS_ENV=production
> > I [2008-12-28 02:37:58]  INFO: delayed_job_worker moved 'up' to
> > 'start'
> > I [2008-12-28 02:37:58]  INFO: delayed_job_worker [trigger] process is
> > running (ProcessRunning)
> > Which seems for some reason it is running?
>
> > What am I missing?
>
> > Cheers,
> > -J
>
> > Here's the config:
>
> > ---
> > RAILS_ROOT = File.dirname(File.dirname(__FILE__))
>
> > God.watch do |w|
> >   w.name = "delayed_job_worker"
> >   w.interval = 30.seconds
> >   w.start    = "#{RAILS_ROOT}/script/job_runner RAILS_ENV=production"
> >   w.uid = "rails"
> >   w.gid = "rails"
>
> >   # retart if memory gets too high
> >   w.transition(:up, :restart) do |on|
> >     on.condition(:memory_usage) do |c|
> >       c.above = 256.megabytes
> >       c.times = 2
> >     end
> >   end
>
> >   # determine the state on startup
> >   w.transition(:init, { true => :up, false => :start }) do |on|
> >     on.condition(:process_running) do |c|
> >       c.running = true
> >     end
> >   end
>
> >   # determine when process has finished starting
> >   w.transition([:start, :restart], :up) do |on|
> >     on.condition(:process_running) do |c|
> >       c.running = true
> >       c.interval = 5.seconds
> >     end
>
> >     # failsafe
> >     on.condition(:tries) do |c|
> >       c.times = 5
> >       c.transition = :start
> >       c.interval = 5.seconds
> >     end
> >   end
>
> >   # start if process is not running
> >   w.transition(:up, :start) do |on|
> >     on.condition(:process_running) do |c|
> >       c.running = false
> >     end
> >   end
> > end
--~--~---------~--~----~------------~-------~--~----~
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