Skip to content

Commit ec2cf15

Browse files
committed
Ability to retrieve batch from a job
1 parent b3df32f commit ec2cf15

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: lib/active_job/job_batch_id.rb

+4
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,9 @@ def deserialize(job_data)
1818
super
1919
self.batch_id = job_data['batch_id']
2020
end
21+
22+
def batch
23+
@batch ||= SolidQueue::JobBatch.find_by(id: batch_id)
24+
end
2125
end
2226
end

0 commit comments

Comments
 (0)