我有以下模型方法在帐户确认后发送欢迎电子邮件
class Member < ActiveRecord::Base
# Include default devise modules. Others available are:
# :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :confirmable
# Methods
# Override devise after_confirmation
def after_confirmation
welcome_email
super
end
# Private Methods
private
def welcome_email
# Brands::MemberMailer.welcome_email(self).deliver_now
p self.inspect
EmailJob.perform_later(self)
end
end
这是我的工作app/jobs/email_job.rb
class EmailJob < ActiveJob::Base
# Set the Queue as Default
queue_as :default
def perform(member)
Brands::MemberMailer.welcome_email(member).deliver_now
end
end
当我确认帐户时,sidekiq被委派但是我收到以下错误
2016-04-14T07:23:33.898Z 2584 TID-ox0d7xt8s EmailJob JID-6bff3e6c3f92f7fea682a97e INFO: start
2016-04-14T07:23:34.033Z 2584 TID-ox0d7xt8s EmailJob JID-6bff3e6c3f92f7fea682a97e INFO: fail: 0.135 sec
2016-04-14T07:23:34.033Z 2584 TID-ox0d7xt8s WARN: {"class"=>"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper", "wrapped"=>"EmailJob", "queue"=>"default", "args"=>[{"job_class"=>"EmailJob", "job_id"=>"914ac6b3-4d63-4f2e-b1eb-81835799e760", "queue_name"=>"default", "arguments"=>[{"_aj_globalid"=>"gid://skreem/Member/3"}], "locale"=>"en"}], "retry"=>true, "jid"=>"6bff3e6c3f92f7fea682a97e", "created_at"=>1460618613.89504, "enqueued_at"=>1460618613.895284, "error_message"=>"NotImplementedError", "error_class"=>"NotImplementedError", "failed_at"=>1460618614.027425, "retry_count"=>0}
2016-04-14T07:23:34.033Z 2584 TID-ox0d7xt8s WARN: NotImplementedError: NotImplementedError
2016-04-14T07:23:34.033Z 2584 TID-ox0d7xt8s WARN: /Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/execution.rb:39:in `perform'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/execution.rb:32:in `block in perform_now'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:117:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:117:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:343:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/active_job.rb:46:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/active_job.rb:46:in `perform'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/active_job.rb:20:in `block (3 levels) in <top (required)>'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:441:in `instance_exec'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:441:in `block in make_lambda'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:342:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:342:in `block in simple'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:497:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:497:in `block in around'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:343:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/i18n-0.7.0/lib/i18n.rb:257:in `with_locale'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/translation.rb:7:in `block (2 levels) in <module:Translation>'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:441:in `instance_exec'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:441:in `block in make_lambda'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:342:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:342:in `block in simple'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:497:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:497:in `block in around'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:498:in `block (2 levels) in around'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:343:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/logging.rb:23:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/logging.rb:23:in `block (4 levels) in <module:Logging>'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/notifications.rb:164:in `block in instrument'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/notifications.rb:164:in `instrument'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/logging.rb:22:in `block (3 levels) in <module:Logging>'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/logging.rb:43:in `block in tag_logger'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:26:in `tagged'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/tagged_logging.rb:68:in `tagged'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/logging.rb:43:in `tag_logger'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/logging.rb:19:in `block (2 levels) in <module:Logging>'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:441:in `instance_exec'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:441:in `block in make_lambda'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:342:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:342:in `block in simple'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:497:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:497:in `block in around'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:505:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:92:in `__run_callbacks__'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:778:in `_run_perform_callbacks'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/execution.rb:31:in `perform_now'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/execution.rb:21:in `execute'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/activejob-4.2.5.2/lib/active_job/queue_adapters/sidekiq_adapter.rb:42:in `perform'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/processor.rb:151:in `execute_job'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/processor.rb:133:in `block (2 levels) in process'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/chain.rb:127:in `block in invoke'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/sidekiq.rb:33:in `block in call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:362:in `perform_action_with_newrelic_trace'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/sidekiq.rb:29:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/server/active_record.rb:6:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/logging.rb:31:in `with_context'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/chain.rb:132:in `call'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/middleware/chain.rb:132:in `invoke'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/processor.rb:128:in `block in process'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/processor.rb:167:in `stats'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/processor.rb:127:in `process'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/processor.rb:79:in `process_one'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/processor.rb:67:in `run'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/util.rb:16:in `watchdog'
/Users/harshamv/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/sidekiq-4.1.1/lib/sidekiq/util.rb:24:in `block in safe_thread'