Question

So, I have this code

class InvoiceNotifier < ActionMailer::Base
  include Sidekiq::Worker
  default from: 'from@email.com',
          return_path: 'any@email.com'


  def testEmail(recipient)
    @account = recipient

    mail(to: recipient).deliver
  end

end

running the command (from console)

InvoiceNotifier.sendMail('my@email.com')

works, though

InvoiceNotifier.delay.sendMail('my@email.com')

does not work, and it returns a string.

How do I debug this? I look at redis and it has 3 keys, though none of them appear to have any values.

Help?

Was it helpful?

Solution

The perform method is not required. The problem was I wasn't doing

bundle exec sidekiq

from command line to actually have an interface to interact with.. http://railscasts.com/episodes/366-sidekiq?view=asciicast is a great place to go to learn since I wasn't really looking at the front page of sidekiq to do their 'get started guide' and while it's on the front page to execute this command, I didn't notice it when I was diving in.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top