Module: Opener::Daemons
- Defined in:
- lib/opener/daemons/daemon.rb,
lib/opener/daemons/mapper.rb,
lib/opener/daemons/worker.rb,
lib/opener/daemons/daemons.rb,
lib/opener/daemons/pidfile.rb,
lib/opener/daemons/version.rb,
lib/opener/daemons/uploader.rb,
lib/opener/daemons/controller.rb,
lib/opener/daemons/downloader.rb,
lib/opener/daemons/transaction.rb,
lib/opener/daemons/configuration.rb,
lib/opener/daemons/option_parser.rb
Defined Under Namespace
Classes: Configuration, Controller, Daemon, Downloader, Mapper, OptionParser, Pidfile, Transaction, Uploader, Worker
Constant Summary collapse
- VERSION =
'2.7.4'
Class Method Summary collapse
-
.configure_rollbar ⇒ Object
Configures Rollbar.
-
.daemon_threads ⇒ Fixnum
Returns the amount of daemon threads to run.
- .environment ⇒ String
-
.input_queue ⇒ String
Returns the name of the input queue to use.
-
.newrelic? ⇒ TrueClass|FalseClass
Returns ‘true` if New Relic monitoring should be enabled.
-
.output_bucket ⇒ String
The name of the S3 bucket to store output in.
-
.rollbar? ⇒ TrueClass|FalseClass
Returns ‘true` if Rollbar error tracking should be enabled.
Class Method Details
.configure_rollbar ⇒ Object
Configures Rollbar.
51 52 53 54 55 56 57 |
# File 'lib/opener/daemons/daemons.rb', line 51 def self. Rollbar.configure do |config| config.access_token = ENV['ROLLBAR_TOKEN'] config.enabled = config.environment = environment end end |
.daemon_threads ⇒ Fixnum
Returns the amount of daemon threads to run.
44 45 46 |
# File 'lib/opener/daemons/daemons.rb', line 44 def self.daemon_threads return ENV['DAEMON_THREADS'].to_i end |
.environment ⇒ String
62 63 64 |
# File 'lib/opener/daemons/daemons.rb', line 62 def self.environment return ENV['DAEMON_ENV'] || ENV['RACK_ENV'] || ENV['RAILS_ENV'] end |
.input_queue ⇒ String
Returns the name of the input queue to use.
26 27 28 |
# File 'lib/opener/daemons/daemons.rb', line 26 def self.input_queue return ENV['INPUT_QUEUE'] end |
.newrelic? ⇒ TrueClass|FalseClass
Returns ‘true` if New Relic monitoring should be enabled.
8 9 10 |
# File 'lib/opener/daemons/daemons.rb', line 8 def self.newrelic? return !!ENV['NEWRELIC_TOKEN'] end |
.output_bucket ⇒ String
The name of the S3 bucket to store output in.
35 36 37 |
# File 'lib/opener/daemons/daemons.rb', line 35 def self.output_bucket return ENV['OUTPUT_BUCKET'] end |
.rollbar? ⇒ TrueClass|FalseClass
Returns ‘true` if Rollbar error tracking should be enabled.
17 18 19 |
# File 'lib/opener/daemons/daemons.rb', line 17 def self. return !!ENV['ROLLBAR_TOKEN'] end |