launching background process in capistrano task

前端 未结 5 687
傲寒
傲寒 2020-12-29 11:59

capistrano task

namespace :service do
  desc \"start daemontools (svscan/supervise/svscanboot)\"
  task :start, :roles => :app do
    sudo \"svscanboot&a         


        
5条回答
  •  长发绾君心
    2020-12-29 12:51

    Try forking the process as explained here: Spawn a background process in Ruby

    You should be able to do something like this:

    job1 = fork do
      run "svscanboot"
    end
    
    Process.detach(job1)
    

    As well, checkout this: Starting background tasks with Capistrano

提交回复
热议问题