diff options
Diffstat (limited to 'activejob')
-rw-r--r-- | activejob/.gitignore | 1 | ||||
-rw-r--r-- | activejob/lib/active_job/core.rb | 1 | ||||
-rw-r--r-- | activejob/test/cases/job_serialization_test.rb | 8 |
3 files changed, 9 insertions, 1 deletions
diff --git a/activejob/.gitignore b/activejob/.gitignore deleted file mode 100644 index b3aaf55871..0000000000 --- a/activejob/.gitignore +++ /dev/null @@ -1 +0,0 @@ -test/dummy diff --git a/activejob/lib/active_job/core.rb b/activejob/lib/active_job/core.rb index 548ec89ee2..e3e63f227e 100644 --- a/activejob/lib/active_job/core.rb +++ b/activejob/lib/active_job/core.rb @@ -80,6 +80,7 @@ module ActiveJob { "job_class" => self.class.name, "job_id" => job_id, + "provider_job_id" => provider_job_id, "queue_name" => queue_name, "priority" => priority, "arguments" => serialize_arguments(arguments), diff --git a/activejob/test/cases/job_serialization_test.rb b/activejob/test/cases/job_serialization_test.rb index 3f2e300dfa..c737557ece 100644 --- a/activejob/test/cases/job_serialization_test.rb +++ b/activejob/test/cases/job_serialization_test.rb @@ -44,4 +44,12 @@ class JobSerializationTest < ActiveSupport::TestCase job.deserialize({}) assert_equal "en", job.locale end + + test "serialize stores provider_job_id" do + job = HelloJob.new + assert_nil job.serialize["provider_job_id"] + + job.provider_job_id = "some value set by adapter" + assert_equal job.provider_job_id, job.serialize["provider_job_id"] + end end |