You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A worker and the main rails process doesn't share a SQL Transaction. So if you sent the emails in an after_create, you might have some fun and your worker might not find the invitation. Use after_commit instead (cf doc lower).
To test and NOT use the sidekiq queue add at the end of your rails_helper.rb:
ActiveJob::Base.queue_adapter=:test
When it's working in dev the fun part begin: Add Redis as an add-on to all of your heroku apps
Add a worker line in your profile to launch sidekiq
Each worker will connect to the DB and the number of connection is limited in a free heroku postgresql so limit the number of sidekiq workers to 10 (-c 10)
Why ?
Sending an email (see ticket #46) with Sendgrid take 1 to 2 sec each time. The user doesn't need to wait and the email can be sent asynchronously.
Must have
Todo
-q default -q mailers
)deliver_now
. To send them through sidekiq, define this in theUser
model:worker
line in your profile to launch sidekiq-c 10
)heroku local worker
(more info on this here: https://devcenter.heroku.com/articles/heroku-local)Reading List
The text was updated successfully, but these errors were encountered: