Consolidate push jobs into single Notification::PushJob
Replace separate WebPushJob and NativePushJob with a single PushJob that calls notification.push, which iterates over registered targets. Each target handles its own delivery - Web pushes synchronously via the pool, Native enqueues device-level jobs via deliver_later_to. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -199,9 +199,4 @@ class Notification::PushTarget::NativeTest < ActiveSupport::TestCase
|
||||
assert_equal @notification.creator.name, native.data[:creator_name]
|
||||
end
|
||||
|
||||
test "push_later enqueues Notification::NativePushJob" do
|
||||
assert_enqueued_with(job: Notification::NativePushJob, args: [ @notification ]) do
|
||||
Notification::PushTarget::Native.push_later(@notification)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user