Module: HireFire::Backend
- Included in:
- Environment::Base
- Defined in:
- lib/hirefire.rb,
lib/hirefire/backend.rb,
lib/hirefire/backend/resque/redis.rb,
lib/hirefire/backend/delayed_job/mongoid.rb,
lib/hirefire/backend/delayed_job/active_record.rb
Overview
HireFire::Backend namespace
Defined Under Namespace
Modules: DelayedJob, Resque
Constant Summary collapse
- DELAYED_JOB_PATH =
File.join(BACKEND_PATH, 'delayed_job')
- RESQUE_PATH =
File.join(BACKEND_PATH, 'resque')
Class Method Summary collapse
-
.included(base) ⇒ nil
Load the correct module (ActiveRecord, Mongoid or Redis) based on which worker and backends are loaded.
Class Method Details
.included(base) ⇒ nil
Load the correct module (ActiveRecord, Mongoid or Redis) based on which worker and backends are loaded
Currently supports:
- Delayed Job with ActiveRecord and Mongoid
- Resque with Redis
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/hirefire/backend.rb', line 15 def self.included(base) ## # Delayed Job specific backends if defined?(::Delayed::Job) if defined?(::Delayed::Backend::ActiveRecord::Job) base.send(:include, HireFire::Backend::DelayedJob::ActiveRecord) end if defined?(::Delayed::Backend::Mongoid::Job) base.send(:include, HireFire::Backend::DelayedJob::Mongoid) end end ## # Resque specific backends if defined?(::Resque) base.send(:include, HireFire::Backend::Resque::Redis) end end |