Class: Jets::Job::Base
Instance Attribute Summary
#context, #event, #meth
Class Method Summary
collapse
#initialize
#lambda_functions
Class Method Details
22
23
24
25
26
|
# File 'lib/jets/job/base.rb', line 22
def perform_later(meth, event, context=nil)
function_name = "#{self.to_s.underscore}-#{meth}"
call = Jets::Commands::Call.new(function_name, JSON.dump(event), invocation_type: "Event")
call.run
end
|
18
19
20
|
# File 'lib/jets/job/base.rb', line 18
def perform_now(meth, event, context=nil)
new(event, context, meth).send(meth)
end
|
.process(event, context, meth) ⇒ Object
13
14
15
16
|
# File 'lib/jets/job/base.rb', line 13
def process(event, context, meth)
job = new(event, context, meth)
job.send(meth)
end
|