提交 b58d73fc 编写于 作者: U utilum

ActiveJob::Core#serialize stores provider_job_id (fixes #26581).

上级 61cc630a
......@@ -80,6 +80,7 @@ def serialize
{
"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),
......
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册