more intelligent queuing of async jobs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user