-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathworkless.rb
More file actions
25 lines (20 loc) · 911 Bytes
/
Copy pathworkless.rb
File metadata and controls
25 lines (20 loc) · 911 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true
require File.dirname(__FILE__) + '/workless/scalers/base'
require File.dirname(__FILE__) + '/workless/scaler'
require File.dirname(__FILE__) + '/workless/controllers/helpers'
require File.dirname(__FILE__) + '/workless/heroku_error_handler'
require File.dirname(__FILE__) + '/workless/railtie' if defined?(Rails::Railtie)
ActiveSupport.on_load(:action_controller) do
include Workless::Controllers::Helpers
end
module Workless
# The minimum timeout between Workless checking if jobs need to be worked
mattr_accessor :work_off_timeout
@@work_off_timeout = 1.minute
# The name of your Heroku application which will be scaled
mattr_accessor :heroku_app_name
@@heroku_app_name = ENV['HEROKU_APP_NAME']
# Handler used when an error occurs communicating with Heroku
mattr_accessor :heroku_error_handler
@@heroku_error_handler = 'Workless::HerokuErrorHandler'
end