diff options
author | Abdelkader Boudih <terminale@gmail.com> | 2014-08-17 19:16:43 +0000 |
---|---|---|
committer | Abdelkader Boudih <terminale@gmail.com> | 2014-08-17 23:10:45 +0000 |
commit | 9a3426220145cf8862324f204eece64f3a6a4634 (patch) | |
tree | 30f9f9ee904e40708e4eb7c1faa6fb989ed1a453 /activejob/lib | |
parent | 931cfc40796bfd2f4638d8ca7a11723d7562e9cd (diff) | |
download | rails-9a3426220145cf8862324f204eece64f3a6a4634.tar.gz rails-9a3426220145cf8862324f204eece64f3a6a4634.tar.bz2 rails-9a3426220145cf8862324f204eece64f3a6a4634.zip |
[ActiveJob] Add deserialize_arguments method to job
Diffstat (limited to 'activejob/lib')
-rw-r--r-- | activejob/lib/active_job/execution.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activejob/lib/active_job/execution.rb b/activejob/lib/active_job/execution.rb index 181d049616..0e7b5bdd72 100644 --- a/activejob/lib/active_job/execution.rb +++ b/activejob/lib/active_job/execution.rb @@ -11,7 +11,7 @@ module ActiveJob 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) @@ -23,5 +23,11 @@ module ActiveJob def perform(*) fail NotImplementedError end + + private + def deserialize_arguments(serialized_args) + Arguments.deserialize(serialized_args) + end + end end |