Skip to content
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

Batch email broken #603

Closed
jmazzi opened this issue Dec 28, 2012 · 3 comments
Closed

Batch email broken #603

jmazzi opened this issue Dec 28, 2012 · 3 comments

Comments

@jmazzi
Copy link
Contributor

jmazzi commented Dec 28, 2012

Pony expects :to to be passed as a sym. Since the options passed to notify are dumped to json, { :to => 'email' } becomes { 'to' => 'emall') on the other side of the queue. Pony then complains of a missing to:.

batch = Sidekiq::Batch.new
batch.notify(:email, :to => 'bob@example.org')
E, [2012-12-28T14:45:29.056758 #11430] ERROR -- : Sidekiq::Processor crashed!
ArgumentError: :to is required
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/pony-1.4/lib/pony.rb:127:in `mail'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/notifications/email.rb:15:in `notify'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:43:in `block in notify!'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:42:in `each_pair'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:42:in `notify!'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:70:in `notify'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:66:in `done'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:49:in `add_success'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:31:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:in `block in invoke'
/Users/justin/work/Site5/helix_core/lib/helix_core/initializers/sidekiq.rb:22:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:in `block in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/timeout.rb:14:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:in `block in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:in `block in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/retry_jobs.rb:49:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:in `block in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/logging.rb:22:in `with_context'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:in `block in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:84:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:84:in `invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:42:in `block (2 levels) in process'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:77:in `stats'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:41:in `block in process'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in `public_send'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in `dispatch'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/future.rb:18:in `block in initialize'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in `call'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in `block in create'

@mperham
Copy link
Collaborator

mperham commented Dec 28, 2012

I'll get this fixed and a new release out this weekend.

On 28 Dec 2012, at 12:06, Justin Mazzi notifications@github.com wrote:

Pony expects :to to be passed as a sym. Since the options passed to notify are dumped to json, { :to => 'email' } becomes { 'to' => 'emall') on the other side of the queue. Pony then complains of a missing to:.

batch = Sidekiq::Batch.new
batch.notify(:email, :to => 'bob@example.org')

E, [2012-12-28T14:45:29.056758 #11430] ERROR -- : Sidekiq::Processor crashed!
ArgumentError: :to is required
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/pony-1.4/lib/pony.rb:127:in mail' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/notifications/email.rb:15:innotify'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:43:in block in notify!' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:42:ineach_pair'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:42:in notify!' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:70:innotify'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:66:in done' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:49:inadd_success'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:31:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/lib/helix_core/initializers/sidekiq.rb:22:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/timeout.rb:14:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/active_record.rb:6:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/retry_jobs.rb:49:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/logging.rb:11:in block in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/logging.rb:22:inwith_context'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/logging.rb:7:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:84:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:84:ininvoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:42:in block (2 levels) in process' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:77:instats'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:41:in block in process' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:incall'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in public_send' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:indispatch'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/future.rb:18:in block in initialize' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:incall'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in `block in create'


Reply to this email directly or view it on GitHub.

@jmazzi
Copy link
Contributor Author

jmazzi commented Dec 28, 2012

In case I wasn't clear, that is the same for each option you can override. e.g. subject, html_body.

Thanks!

Justin Mazzi

On Friday, December 28, 2012 at 3:20 PM, Mike Perham wrote:

I'll get this fixed and a new release out this weekend.

On 28 Dec 2012, at 12:06, Justin Mazzi <notifications@github.com (mailto:notifications@github.com)> wrote:

Pony expects :to to be passed as a sym. Since the options passed to notify are dumped to json, { :to => 'email' } becomes { 'to' => 'emall') on the other side of the queue. Pony then complains of a missing to:.

batch = Sidekiq::Batch.new
batch.notify(:email, :to => 'bob@example.org (mailto:bob@example.org)')

E, [2012-12-28T14:45:29.056758 #11430] ERROR -- : Sidekiq::Processor crashed!
ArgumentError: :to is required
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/pony-1.4/lib/pony.rb:127:in mail' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/notifications/email.rb:15:innotify'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:43:in block in notify!' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:42:ineach_pair'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/status.rb:42:in notify!' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:70:innotify'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:66:in done' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:49:inadd_success'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-pro-0.7.1/lib/sidekiq/batch/middleware.rb:31:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/lib/helix_core/initializers/sidekiq.rb:22:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/timeout.rb:14:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/active_record.rb:6:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/retry_jobs.rb:49:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/logging.rb:11:in block in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/logging.rb:22:inwith_context'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/server/logging.rb:7:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:81:inblock in invoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:84:in call' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/middleware/chain.rb:84:ininvoke'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:42:in block (2 levels) in process' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:77:instats'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/sidekiq-2.6.0/lib/sidekiq/processor.rb:41:in block in process' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:incall'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:in public_send' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/calls.rb:23:indispatch'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/future.rb:18:in block in initialize' /Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:incall'
/Users/justin/work/Site5/helix_core/bundle/ruby/1.9.1/gems/celluloid-0.12.4/lib/celluloid/internal_pool.rb:48:in `block in create'


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub (#603 (comment)).

@mperham
Copy link
Collaborator

mperham commented Dec 30, 2012

Fixed in master now, release coming in the next day.

@mperham mperham closed this as completed Dec 30, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants