Skip to content

suggested chang to fix issue #20 (https://github.com/PRX/apn_on_rails/issues#issue/20) #25

Open
wants to merge 2 commits into from

3 participants

@andreasmueller

As suggested, the code now uses only one query (rather than a query per device) to get all notifications. I have tested the code only locally, so please review carefully ..

andreasmueller added some commits Jan 27, 2011
@andreasmueller andreasmueller modified send_notifications_for_cert routine to decrease db load
Rather than making a query for each device, we can get all unsent
notifications for a given app with one SQL query.

The change also required a slight update of the app_spec.
e6e9b8d
@andreasmueller andreasmueller specify :select in find to avoid :read_only
The APN::Notification.find call returned read-only ActiveRecords, which
can be prevented by specifying :select.

-> see http://stackoverflow.com/questions/639171/what-is-causing-this-activerecordreadonlyrecord-error
9462d19
@stuartkhall

Please merge this :)

@jeffday
jeffday commented Oct 17, 2013

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.