"restart" actually just calls "stop" and the "start".  The "stop"
command issues a SIGTERM signal to the process.  If delayed_job is in
the middle of processing something it catches that signal and
continues processing.

God then enters a loop that checks to see if the process is still
running for 5 cycles.  If it is running, it issues a SIGKILL signal.
This is equivalent to "kill -9" and there's no way for delayed_job to
catch this signal, so it dies without updating the DB.

If you want to restart god or restart workers during a deploy
processing or something.  Instead of calling restart you should call
"god unmonitor <group>" and then "god start <group>".  This will leave
any running delayed_jobs alone until they finish and won't start any
new ones until you call "god start".

I'm current trying to find a way to gracefully stop god that will just
issue SIGTERM and log a warning if a process is still running.

Bob

On Jan 18, 10:29 am, Michael Guterl <[email protected]> wrote:
> I just started trying out god using this config:http://gist.github.com/280245
>
> Only problem is that when I `god restart dj` it immediately kills the
> workers, leaving the current job they are working on locked.
>
> Any suggestions?
>
> Best,
> Michael Guterl

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