willbryant/niet — Issue #1: TERM signal causes restart, but process not updated with new codebase
Author: nigelramsay
Created: 2011-10-30 23:02:58+00:00
State: open

I'm following the instructions in DEPLOYING for redeploying my Rails app with Capistrano.

When the restart capistrano task is run, it is executing:

```run "killall -u deploy niet"```

Niet kicks into action, and sends the TERM signal, which I see in the syslog:

```Oct 31 11:55:40 tst-app1 bundle: Asking bundle to terminate so we can restart it
Oct 31 11:55:45 tst-app1 bundle: [Worker(host:tst-app1 pid:9895)] Starting job worker
Oct 31 11:55:45 tst-app1 bundle: [Worker(host:tst-app1 pid:9895)] Exiting...
Oct 31 11:55:45 tst-app1 bundle: bundle finished as requested
Oct 31 11:55:45 tst-app1 bundle: Running bundle```

But the restarted process (delayed job) retains the old codebase. To work around this, I have replaced the start with capistrano restart task with:

```run "while killall -u deploy -QUIT niet; do sleep 1; done"
start```

It's running on Ubuntu 10.04, and I'm initiating the restart with:

```after 'deploy:restart', 'niet:restart'```

Any help would be much appreciated.

Cheers

Nigel