Module: DelayedCrud::BackgroundJobHandler

Defined in:
lib/delayed_crud/background_job_handler.rb,
lib/delayed_crud/background_job_handler/sidekiq_handler.rb

Overview

:nodoc:

Defined Under Namespace

Modules: SidekiqHandler

Class Method Summary collapse

Class Method Details

.delayed_create(record, attributes, options = {}) ⇒ Object



11
12
13
# File 'lib/delayed_crud/background_job_handler.rb', line 11

def delayed_create(record, attributes, options = {})
  handler_instance.delayed_create(record, attributes, options)
end

.delayed_destroy(record, options = {}) ⇒ Object



19
20
21
# File 'lib/delayed_crud/background_job_handler.rb', line 19

def delayed_destroy(record, options = {})
  handler_instance.delayed_destroy(record, options)
end

.delayed_update(record, attributes, options = {}) ⇒ Object



15
16
17
# File 'lib/delayed_crud/background_job_handler.rb', line 15

def delayed_update(record, attributes, options = {})
  handler_instance.delayed_update(record, attributes, options)
end

.handler_instanceObject



23
24
25
26
# File 'lib/delayed_crud/background_job_handler.rb', line 23

def handler_instance
  handler_class = "#{DelayedCrud.queue_adapter.to_s.capitalize}Handler"
  DelayedCrud::BackgroundJobHandler.const_get(handler_class)
end