mirror of
https://github.com/wahyd4/sidekiq_mailer.git
synced 2026-08-09 04:56:11 +10:00
Fix typo again
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
# Sidekiq::Mailer
|
||||
|
||||
Sidekiq::Mailer adds to your ActionMailer classes the ability to send mails asyncronously.
|
||||
Sidekiq::Mailer adds to your ActionMailer classes the ability to send mails asynchronously.
|
||||
|
||||
## Usage
|
||||
|
||||
If you want to make a specific mailer to work asyncronously just include Sidekiq::Mailer module:
|
||||
If you want to make a specific mailer to work asynchronously just include Sidekiq::Mailer module:
|
||||
|
||||
class MyMailer < ActionMailer::Base
|
||||
include Sidekiq::Mailer
|
||||
@@ -14,9 +14,9 @@ If you want to make a specific mailer to work asyncronously just include Sidekiq
|
||||
end
|
||||
end
|
||||
|
||||
Now every deliver you make with MyMailer will be asyncronous.
|
||||
Now every deliver you make with MyMailer will be asynchronous.
|
||||
|
||||
# Queues the mail to be sent asyncronously by sidekiq
|
||||
# Queues the mail to be sent asynchronously by sidekiq
|
||||
MyMailer.welcome('your@email.com').deliver
|
||||
|
||||
The default queue used by Sidekiq::Mailer is 'mailer'. So, in order to send mails with sidekiq you need to start a worker using:
|
||||
@@ -25,7 +25,7 @@ The default queue used by Sidekiq::Mailer is 'mailer'. So, in order to send mail
|
||||
|
||||
If you want to skip sidekiq you should use the 'deliver!' method:
|
||||
|
||||
# Mail will skip sidekiq and will be sent syncronously
|
||||
# Mail will skip sidekiq and will be sent synchronously
|
||||
MyMailer.welcome('your@email.com').deliver!
|
||||
|
||||
By default Sidekiq::Mailer will retry to send an email if it failed. But you can [override sidekiq options](https://github.com/andersondias/sidekiq_mailer/wiki/Overriding-sidekiq-options) in your mailer.
|
||||
|
||||
@@ -73,7 +73,7 @@ class SidekiqMailerTest < Test::Unit::TestCase
|
||||
assert_equal 1, ActionMailer::Base.deliveries.size
|
||||
end
|
||||
|
||||
def test_delivers_syncronously_if_running_in_a_excluded_environment
|
||||
def test_delivers_synchronously_if_running_in_a_excluded_environment
|
||||
Sidekiq::Mailer.excluded_environments = [:test]
|
||||
BasicMailer.welcome('test@test.com').deliver
|
||||
assert_equal 0, Sidekiq::Mailer::Worker.jobs.size
|
||||
|
||||
Reference in New Issue
Block a user