Jerrod Blavos
2007-Feb-05 20:12 UTC
[Backgroundrb-devel] Deploying with capistrano issue. Resolution !
ok, i was wrong. the failure on deployment using capistrano is 100%
using these commands
## Our Handlers
desc "Restart BackgrounDrb"
task :restart_uploader, :roles => :app do
run "#{current_path}/script/backgroundrb stop"
run "#{current_path}/script/backgroundrb start"
end
here is the console post deploy on the remote server
########
[current]$ script/backgroundrb console
irb: warn: can''t alias jobs from irb_jobs.
irb(#<BackgrounDRb::MiddleMan:0xb7b74088>):001:0> loaded_worker_classes
=> []
irb(#<BackgrounDRb::MiddleMan:0xb7b74088>):002:0> exit
Now ill stop it and start it again on the remote server
########
[current]$ script/backgroundrb stop
[current]$ script/backgroundrb start
[current]$ script/backgroundrb console
irb: warn: can''t alias jobs from irb_jobs.
irb(#<BackgrounDRb::MiddleMan:0xb7c13ed0>):001:0> loaded_worker_classes
=> ["Mp3Worker", "FlvWorker"]
i DID find however that the following worked. seems i HAVE to be in
the current directory in order for it to start properly. maybe this
will help in tracking down the issue?
desc "Restart BackgrounDrb"
task :restart_backgroundrb, :roles => :app do
run "cd #{current_path} && script/backgroundrb stop"
run "cd #{current_path} && script/backgroundrb start"
end
Jerrod Blavos
ph. 919.341.0143
fx. 482.492.5009
jerrod at indierockmedia.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20070205/44e360df/attachment-0001.html
P. Mark Anderson
2007-Feb-06 19:22 UTC
[Backgroundrb-devel] Deploying with capistrano issue. Resolution!
Somewhat related to the deployment issue, I like to make sure
Backgroundrb is ready before launching workers and that''s what this
code
does. It lives in my ApplicationController.
pmark
#
# 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
Apparently Analagous Threads
- Deploying to production with backgroundrb (capistrano)
- BackgrounDRb after restarting server
- Creating 3d partial dependence plots
- rails environment loaded but one plugin is undefined (using backgroundrb 0.2.0)
- mongrel_upload_progress + upload.rb +background (daemon?)