8000 Missing push notifications for all but first device when sending through Delayed::Job by morrissinger · Pull Request #67 · PRX/apn_on_rails · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Missing push notifications for all but first device when sending through Delayed::Job #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/apn_on_rails/app/models/apn/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ def self.send_notifications_for_cert(the_cert, app_id)
APN::Device.find_each(:conditions => conditions) do |dev|
dev.unsent_notifications.each do |noty|
conn.write(noty.message_for_sending)

# This seems to fix the bug where multiple notifications get
# missed by Apple when sending Push notifications as a worker
# task through Delayed::Job
sleep 0.00000001

noty.sent_at = Time.now
noty.save
end
Expand Down
0