sidekiq_mailer icon indicating copy to clipboard operation
sidekiq_mailer copied to clipboard

How to create global configuration for sidekiq_mailer

Open coderhs opened this issue 10 years ago • 3 comments

Is it possible to create a global config and set all the mails to be send to queue named 'default'.

coderhs avatar Aug 14 '14 11:08 coderhs

@andersondias Is it possible to add an initializer and configure the gem to add to a particular queue?

coderhs avatar Aug 14 '14 19:08 coderhs

Nope, it's not possible right now. A Pull Request with this would be awesome :D

andersondias avatar Aug 15 '14 19:08 andersondias

@andersondias : I have worked on it a bit. It is working the code can be found here https://github.com/coderhs/sidekiq_mailer/tree/configure. I have written the test for the configuration as a separate file so moved the common class to the test helper. Individually running the test file they pass, but when i run them together. The configuration that I have set for one test seems to persist when other test runs thus causing issues. I haven't been able to solve it. Will look into that issue soon and send a pull request.

PS: Feel free to correct or point out any mistakes, in the way i have written the code.

coderhs avatar Aug 19 '14 16:08 coderhs