Skip to content

Commit

Permalink
[ActiveJob] Add deserialize_arguments method to job
Browse files Browse the repository at this point in the history
  • Loading branch information
seuros committed Aug 17, 2014
1 parent 931cfc4 commit 9a34262
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion activejob/lib/active_job/execution.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Execution

def execute(job_id, *serialized_args)
self.job_id = job_id
self.arguments = Arguments.deserialize(serialized_args)
self.arguments = deserialize_arguments(serialized_args)

run_callbacks :perform do
perform(*arguments)
Expand All @@ -23,5 +23,11 @@ def execute(job_id, *serialized_args)
def perform(*)
fail NotImplementedError
end

private
def deserialize_arguments(serialized_args)
Arguments.deserialize(serialized_args)
end

end
end

0 comments on commit 9a34262

Please sign in to comment.