platanus / potassium

A Rails application generator by Platanus, inspired by Suspenders
MIT License
232 stars 17 forks source link

Adding the email recipe with sidekiq selected should add 'mailers' queue #334

Closed rjherrera closed 3 years ago

rjherrera commented 3 years ago

When mailing is selected to create an app (or installed as a recipe) we should add the queue name to the queues entry in the sidekiq.yml file, something like:

production:
  :concurrency: 5
:queues:
  - default
  - mailers

By default, jobs queued by using .deliver_later on a mailer object are queued in the mailers queue and if the queue is not declared in the yml, jobs aren't processed.

That piece of extra configuration is very easy to miss when setting up mailing for an app and results in a difficult to debug error in which you only see jobs getting queued, but not processed, and no warning or error raised.

difernandez commented 3 years ago

Agree! I'll take a stab at this