Class: Delayed::Plugin

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

Direct Known Subclasses

Delayed::Plugins::ClearLocks

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePlugin

Returns a new instance of Plugin.


11
12
13
# File 'lib/delayed/plugin.rb', line 11

def initialize
  self.class.callback_block.call(Delayed::Worker.lifecycle) if self.class.callback_block
end

Class Method Details

.callbacks(&block) ⇒ Object


7
8
9
# File 'lib/delayed/plugin.rb', line 7

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