Class: Delayed::Plugin

Inherits:
Object
  • Object
show all
Defined in:
lib/delayed/plugin.rb

Direct Known Subclasses

RailsReloaderPlugin

Class Method Summary collapse

Class Method Details

.callbacks(&block) ⇒ Object



9
10
11
# File 'lib/delayed/plugin.rb', line 9

def self.callbacks(&block)
  self.callback_block = block
end

.inject!Object



13
14
15
16
# File 'lib/delayed/plugin.rb', line 13

def self.inject!
  callback_block&.call(Delayed::Worker.lifecycle) unless @injected
  @injected = true
end

.reset!Object



18
19
20
# File 'lib/delayed/plugin.rb', line 18

def self.reset!
  @injected = false
end