Closed silentdth closed 11 years ago
I'm not sure this has anything to do with sucker_punch, honestly. Let's assume you create that connection outside of your job and it's global, you could easily use that connection in your sucker_punch job. I would be slightly worried about it blocking though if it's in use and you can only have one open, especially if you queue up many jobs at once. The Celluloid queue worker minimum is 2, so 2 workers will always be executing jobs in that queue, so there's a potential that one could be waiting for the connection to become available.
Thanks Brandon, appreciate the comments.
Is it possible to keep a persistent connection with a sucker_punch job, so that it is reused every time a job is called? This is for the Apple APNS to send push notifications using the grocer gem on heroku.
Thanks.