Sign in through GitHub

RailsCasts Pro episodes are now free!

Learn more or hide this

mdere's Profile

GitHub User: mdere

Comments by

Avatar

So I am trying to get this set up for my AWS EC2 instance, I currently have 2 tiers (staging / prod) and deploying with capistrano. Followed the tutorial video and some other tutorials elsewhere to supplement

Looking for some expert input on my approach and pointing out things that I might be missing. I manage to get Redis / sidekiq installed on the staging instance ( as I am confirming this works before moving onto production ).

I have one worker EmailSender

ruby
class EmailSender
  include Sidekiq::Worker
  sidekiq_options retry: true, queue: "high"
  
  def perform(email_hash)
    stuff
  end
end

my deploy.rb

ruby
namespace :deploy do
  task :start, :roles => :app do
    run "touch #{current_path}/tmp/restart.txt"
    run "touch #{current_path}/log/sidekiq.log"
    run "cd #{current_path}; bundle exec sidekiq -d L log/sidekiq.log -C './config/sidekiq.yml'"

Then my sidekiq.yml

ruby
:verbose: false
:pidfile: ./tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
:concurrency: 25
:queues:
  - [high, 5]
  - [default, 1]

When I deployed, it correctly brings up the sidekiq instance - which I can confirm via ps aux | grep sidekiq...

But when I try to process the emailsender job...it seems like it isn't doing anything, wondering if anything above or if I am missing causing the job to not be picked up?

I tried to the perform job manually and it works.

Thanks!