diff --git a/environment.rb b/environment.rb index 667e21e5..47b93768 100644 --- a/environment.rb +++ b/environment.rb @@ -18,6 +18,10 @@ DB = Sequel.connect $config['database'], sslmode: 'disable', max_connections: $c Dir.glob('workers/*.rb').each {|w| require File.join(DIR_ROOT, "/#{w}") } +Backburner.configure do |config| + config.default_worker = Backburner::Workers::ThreadsOnFork +end + if defined?(Pry) Pry.commands.alias_command 'c', 'continue' Pry.commands.alias_command 's', 'step' @@ -47,7 +51,7 @@ if ENV['RACK_ENV'] == 'development' && Server.count == 0 end Backburner.configure do |config| - config.max_job_retries = 3 + config.max_job_retries = 10 config.retry_delay = 200 config.respond_timeout = 120 end diff --git a/jobs/screenshot_job.rb b/jobs/screenshot_job.rb index 6912cf3c..fe88fe63 100644 --- a/jobs/screenshot_job.rb +++ b/jobs/screenshot_job.rb @@ -29,7 +29,7 @@ class ScreenshotJob img_list.new_image(img_list.first.columns, img_list.first.rows) { self.background_color = "white" } img = img_list.reverse.flatten_images img.crop!(0, 0, 1280, 720) - img.resize! 600, 400 + img.resize! 500, 300 img.write File.join(DIR_ROOT, 'public', 'site_screenshots', "#{username}.jpg") end end