Class: Gorgon::CallbackHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/gorgon/callback_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ CallbackHandler

Returns a new instance of CallbackHandler.



3
4
5
6
# File 'lib/gorgon/callback_handler.rb', line 3

def initialize(config)
  @config = config || {}
  load(@config[:callbacks_class_file]) if @config[:callbacks_class_file]
end

Instance Method Details

#after_completeObject



29
30
31
# File 'lib/gorgon/callback_handler.rb', line 29

def after_complete
  Gorgon.callbacks.after_complete
end

#after_creating_workersObject



25
26
27
# File 'lib/gorgon/callback_handler.rb', line 25

def after_creating_workers
  Gorgon.callbacks.after_creating_workers
end

#after_job_finishesObject



33
34
35
# File 'lib/gorgon/callback_handler.rb', line 33

def after_job_finishes
  Gorgon.callbacks.after_job_finishes
end

#after_syncObject



13
14
15
# File 'lib/gorgon/callback_handler.rb', line 13

def after_sync
  Gorgon.callbacks.after_sync
end

#before_creating_workersObject



17
18
19
# File 'lib/gorgon/callback_handler.rb', line 17

def before_creating_workers
  Gorgon.callbacks.before_creating_workers
end

#before_originateObject



8
9
10
11
# File 'lib/gorgon/callback_handler.rb', line 8

def before_originate
  cluster_id = Gorgon.callbacks.before_originate
  return cluster_id if cluster_id.is_a?(String)
end

#before_startObject



21
22
23
# File 'lib/gorgon/callback_handler.rb', line 21

def before_start
  Gorgon.callbacks.before_start
end