arthurnn / apn_sender

Background worker to send Apple Push Notifications over a persistent TCP socket.
MIT License
376 stars 146 forks source link

Sidekiq Password not set using development mode #65

Open AlanHassen opened 10 years ago

AlanHassen commented 10 years ago

Just trying to use apn_sender with sidekiq in development mode:

APN.host = 'gateway.sandbox.push.apple.com'
APN.password = 'justapw'
APN.pool_size = 1 # number of connections on the pool
APN.pool_timeout = 5 # timeout in seconds for connection pool
device_token = "123"
APN.backend = :sidekiq
APN.notify_async(device_token, :alert => 'PushPlugin works!!', :badge => 1, :sound => 'beep.wav')

And sidekiq askes me for a password?

2014-01-31T17:48:52Z 12372 TID-ko1ws APN::Jobs::SidekiqNotificationJob JID-11111 INFO: start
Enter PEM pass phrase:
arthurnn commented 10 years ago

does your certificate file requires a password?

AlanHassen commented 10 years ago

oh i did a kind of stupid mistake... i tried to use APN.password in a method, not as an initializer. Just wondering, apn needs about a second to send the message with a worker, android 0,2 seconds. Is that normal for APN?

arthurnn commented 10 years ago

@AlanHassen Not sure... We were sending hundreds APN notifications per second before, but I am not sure about the delay on apple side...