Feature #108
Get backgroundrb and ferret restarting with capistrano
| Status: | Closed | Start: | ||
| Priority: | High | Due date: | ||
| Assigned to: | yossarian | % Done: | 0% |
|
| Category: | Core | |||
| Target version: | 0.4 - Rebel Yell (2b || !2b) | |||
| Resolution: | fixed |
Description
The current deployment problems are making me nuts. It needs to be much smoother.
Here's one thing which may help, a shell script for starting backgroundrb in capistrano (from here):
#!/bin/sh echo "Starting the backgroundrb server" echo "cd /var/www/xxx/current; rake backgroundrb:start" cd /var/www/xxx/current log="/tmp/backgroundrb.@date +%s@" echo "Writing to $log" nohup rake backgroundrb:start > $log 2>&1 cat $log rm -f $log
History
Updated by yossarian over 3 years ago
Here's a little tidbit regarding nohup + backgroundrb:
http://rubyforge.org/pipermail/backgroundrb-devel/2007-February/000718.html
Updated by yossarian over 3 years ago
Not a solution, but another interesting chunk of code:
# Confirm Backgroundrb is running and start if dead.
#
def prepare_backgroundrb
begin
# try to contact Backgroundrb in some way
MiddleMan.gc!((Time.now-10.years).to_time)
rescue
begin
@cd #{RAILS_ROOT} && script/backgroundrb start@
sleep(10)
rescue
log.error("unable to start Backgroundrb: #{$!}")
end
end
end
Updated by yossarian over 3 years ago
- Status changed from New to Closed
- Resolution set to fixed
Ok, this seems to be working now.