more intelligent queuing of async jobs

This commit is contained in:
albert
2013-03-03 01:12:31 -05:00
parent b55d40e70a
commit f0b29fc3ba
8 changed files with 23 additions and 25 deletions

View File

@@ -168,7 +168,7 @@ module Danbooru
# Names of other Danbooru servers.
def other_server_hosts
all_server_hosts.reject {|x| x == server_host}
@other_server_hosts ||= all_server_hosts.reject {|x| x == server_host}
end
def remote_server_login

View File

@@ -105,7 +105,7 @@ end
namespace :delayed_job do
desc "Start delayed_job process"
task :start, :roles => :app do
run "cd #{current_path}; RAILS_ENV=#{rails_env} bundle exec ruby script/delayed_job start"
run "cd #{current_path}; RAILS_ENV=#{rails_env} bundle exec ruby script/delayed_job --queue=`hostname` start"
end
desc "Stop delayed_job process"