I used to use Delayed_Job for sending mails in my rails application but as long as it occupied my ram I decided to use Sidekiq instead. I did this:
gem file
gem 'sidekiq'
application.rb
config.active_job.queue_adapter = :sidekiq
development.rb
config.active_job.queue_adapter = :sidekiq
controller
SampleMailer.method(data).deliver_now
mailer
def method(data)
mail(to: "[email protected]", subject: "#{data}")
end
But when I was installing Sidekiq I noticed that I have to install redis-server on my ubuntu. I installed redis server and every thing works fine now but the thing is I don't want to install redis-server . Is redis server a required dependency for Sidekiq or I can ignore it in some way ? Thank you in advance
Sidekiq uses it as a storage, and it's the only option, it doesn't support other storages. Here's a quote from the documentation:
Requirements
Sidekiq supports CRuby 2.2.2+ and JRuby 9k.
All Rails releases >= 4.0 are officially supported.
Redis 2.8 or greater is required. 3.0.3+ is recommended for large installations with thousands of worker threads.