lib/jets/job/base.rb in jets-3.0.21 vs lib/jets/job/base.rb in jets-3.0.22
- old
+ new
@@ -24,16 +24,16 @@
job = new(event, context, meth)
job.send(meth)
end
def perform_now(meth, event={}, context={})
- new(event.try(:to_unsafe_h), context, meth).send(meth)
+ new(event, context, meth).send(meth)
end
def perform_later(meth, event={}, context={})
if on_lambda?
function_name = "#{self.to_s.underscore}-#{meth}"
- call = Jets::Commands::Call.new(function_name, JSON.dump(event.try(:to_unsafe_h)), invocation_type: "Event")
+ call = Jets::Commands::Call.new(function_name, JSON.dump(event), invocation_type: "Event")
call.run
else
puts "INFO: Not on AWS Lambda. In local mode perform_later executes the job with perform_now instead."
perform_now(meth, event, context)
end