tune good_job, no twitter for serverhost-1
This commit is contained in:
14
Rakefile
14
Rakefile
@@ -40,17 +40,19 @@ task :good_job do
|
||||
|
||||
env_hash = {
|
||||
"RAILS_ENV" => "worker",
|
||||
"GOOD_JOB_POLL_INTERVAL" => "30",
|
||||
"GOOD_JOB_MAX_CACHE" => "100",
|
||||
"GOOD_JOB_QUEUE_SELECT_LIMIT" => "128",
|
||||
"GOOD_JOB_MAX_THREADS" => "1",
|
||||
"GOOD_JOB_POLL_INTERVAL" => "2",
|
||||
"GOOD_JOB_MAX_CACHE" => "10000",
|
||||
"GOOD_JOB_QUEUE_SELECT_LIMIT" => "4096",
|
||||
"GOOD_JOB_MAX_THREADS" => "4",
|
||||
"GOOD_JOB_QUEUES" => [
|
||||
"manual:4",
|
||||
"static_file:4",
|
||||
"+static_file,fa_post:4",
|
||||
"+static_file,fa_post:2",
|
||||
"fa_post:2",
|
||||
"+fa_user_page,fa_user_gallery:2",
|
||||
proxy == "serverhost-1" ? nil : "twitter_timeline_tweets:1",
|
||||
"-static_file,fa_post,manual,fa_user_page,fa_user_gallery,twitter_timeline_tweets:2",
|
||||
].join(";"),
|
||||
].reject(&:nil?).join(";"),
|
||||
}
|
||||
|
||||
env_hash.each do |key, value|
|
||||
|
||||
@@ -31,9 +31,7 @@ module ReduxScraper
|
||||
|
||||
if Rails.env.worker? || Rails.env.test?
|
||||
config.good_job.execution_mode = :async
|
||||
config.good_job.on_thread_error = ->(exception) {
|
||||
binding.pry
|
||||
}
|
||||
config.good_job.on_thread_error = ->(exception) { }
|
||||
else
|
||||
config.good_job.execution_mode = :external
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user