I'm using boto
and SNS to send push notifications to iOS. I've made a wrapper class, APNS
, that keeps a long running boto.SNSConnection
as a member variable.
I'd like to have an instance of the APNS
class as a global variable, so I can use celery
to send push notifications in the background.
Are there any problems with keeping a long running SNSConnection
and re-using it, or should I be creating a new connection every time I want to publish a message?