Reputation: 790
In rails guide, I see the way to deliver email is calling like this:
UserMailer.welcome(@user).deliver
But in our codebase, I see code like this using sidekiq:
UserMailer.delay.welcome(@user)
And likely it works. I am wondering, should I call deliver
to make the action happen or sidekiq does some magic here?
Upvotes: 0
Views: 80
Reputation: 585
As you can see in Sidekiq
's sources (click here) it calls deliver
for you. Thats why you don't need to call it when you delay email.
Upvotes: 2