tweaks to config

This commit is contained in:
Kyle Drake 2013-07-09 03:32:12 +02:00
parent d85482a6c4
commit 4e20af4618
2 changed files with 6 additions and 2 deletions

View file

@ -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}") } 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) if defined?(Pry)
Pry.commands.alias_command 'c', 'continue' Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step' Pry.commands.alias_command 's', 'step'
@ -47,7 +51,7 @@ if ENV['RACK_ENV'] == 'development' && Server.count == 0
end end
Backburner.configure do |config| Backburner.configure do |config|
config.max_job_retries = 3 config.max_job_retries = 10
config.retry_delay = 200 config.retry_delay = 200
config.respond_timeout = 120 config.respond_timeout = 120
end end

View file

@ -29,7 +29,7 @@ class ScreenshotJob
img_list.new_image(img_list.first.columns, img_list.first.rows) { self.background_color = "white" } img_list.new_image(img_list.first.columns, img_list.first.rows) { self.background_color = "white" }
img = img_list.reverse.flatten_images img = img_list.reverse.flatten_images
img.crop!(0, 0, 1280, 720) 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") img.write File.join(DIR_ROOT, 'public', 'site_screenshots', "#{username}.jpg")
end end
end end