Module: CarrierWave::Backgrounder
- Includes:
- Support::Backends
- Defined in:
- lib/backgrounder/delay.rb,
lib/backgrounder/railtie.rb,
lib/backgrounder/version.rb,
lib/backgrounder/orm/base.rb,
lib/carrierwave_backgrounder.rb,
lib/backgrounder/orm/activemodel.rb,
lib/backgrounder/orm/data_mapper.rb,
lib/backgrounder/support/backends.rb
Defined Under Namespace
Modules: Delay, ORM, Support Classes: Railtie
Constant Summary collapse
- VERSION =
"1.1.2"
Class Attribute Summary collapse
-
.suppress_not_found_errors ⇒ Object
readonly
Returns the value of attribute suppress_not_found_errors.
-
.worker_klass ⇒ Object
readonly
Returns the value of attribute worker_klass.
Class Method Summary collapse
- .configure {|_self| ... } ⇒ Object
- .suppress_record_not_found_errors(suppress_errors = true) ⇒ Object
Methods included from Support::Backends
Class Attribute Details
.suppress_not_found_errors ⇒ Object (readonly)
Returns the value of attribute suppress_not_found_errors.
12 13 14 |
# File 'lib/carrierwave_backgrounder.rb', line 12 def suppress_not_found_errors @suppress_not_found_errors end |
.worker_klass ⇒ Object (readonly)
Returns the value of attribute worker_klass.
12 13 14 |
# File 'lib/carrierwave_backgrounder.rb', line 12 def worker_klass @worker_klass end |
Class Method Details
.configure {|_self| ... } ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/carrierwave_backgrounder.rb', line 15 def self.configure yield self @suppress_not_found_errors ||= true case backend when :active_job @worker_klass = 'CarrierWave::Workers::ActiveJob' require 'backgrounder/workers/active_job/process_asset' require 'backgrounder/workers/active_job/store_asset' when :sidekiq @worker_klass = 'CarrierWave::Workers' ::CarrierWave::Workers::ProcessAsset.class_eval do include ::Sidekiq::Worker end ::CarrierWave::Workers::StoreAsset.class_eval do include ::Sidekiq::Worker end end end |
.suppress_record_not_found_errors(suppress_errors = true) ⇒ Object
37 38 39 |
# File 'lib/carrierwave_backgrounder.rb', line 37 def self.suppress_record_not_found_errors(suppress_errors = true) @suppress_not_found_errors = suppress_errors end |