Class: BackgroundQueue::Worker::Config
- Inherits:
-
Object
- Object
- BackgroundQueue::Worker::Config
- Defined in:
- lib/background_queue/worker/config.rb
Constant Summary collapse
- @@worker_path =
nil
Class Method Summary collapse
- .default_worker_path ⇒ Object
- .secret ⇒ Object
- .secret=(auth) ⇒ Object
- .worker_path ⇒ Object
- .worker_path=(path) ⇒ Object
Class Method Details
.default_worker_path ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/background_queue/worker/config.rb', line 26 def self.default_worker_path if defined?(RAILS_ROOT) File.join(RAILS_ROOT, "lib", "bgq_workers") elsif defined?(Rails) File.join(Rails.root, "lib", "bgq_workers") else raise "You must specify the BackgroundQueue::Worker::Config.worker_path" end end |
.secret ⇒ Object
10 11 12 |
# File 'lib/background_queue/worker/config.rb', line 10 def self.secret @@secret end |
.secret=(auth) ⇒ Object
6 7 8 |
# File 'lib/background_queue/worker/config.rb', line 6 def self.secret=(auth) @@secret = auth end |
.worker_path ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/background_queue/worker/config.rb', line 18 def self.worker_path if @@worker_path.nil? default_worker_path else @@worker_path end end |
.worker_path=(path) ⇒ Object
14 15 16 |
# File 'lib/background_queue/worker/config.rb', line 14 def self.worker_path=(path) @@worker_path = path end |