Not sure how to debug this. On my staging server, it appears my workers are no longer getting enqueued.
config/sidekiq.yml:
---
:verbose: true
:concurrency: 5
:pidfile: tmp/pids/sidekiq.pid
:logfile: ./log/sidekiq.log
staging:
:concurrency: 10
production:
:concurrency: 20
:queues:
- critical
- default
- low
my worker:
##
# Sidekiq Worker responsible for calling PgpKeyFingerprinter for the specified
# PgpKey and calling GreetingsGenerator for the specified account holder.
#
# This worker is initiated from CreateNewKey.
#
class GreetingsWorker
include Sidekiq::Worker
sidekiq_options queue: 'critical'
def perform account_holder_id, pgp_key_id
Rails.logger.info "[INFO] GreetingsWorker performing with argument 'account_holder_id' #{account_holder_id}, 'pgp_key_id' #{pgp_key_id}" pgp_key = PgpKey.find pgp_key_id
PgpKeyFingerprinter.new( pgp_key ).assign
account_holder = User.find account_holder_id
GreetingsGenerator.new( account_holder ).send
end
end
in rails console:
=> "5874dd2c051eb1451b00883a"
irb(main):014:0> stats = Sidekiq::Stats.new
=> #<Sidekiq::Stats:0x00000811026070 @stats={:processed=>0, :failed=>0, :scheduled_size=>0, :retry_size=>0, :dead_size=>0, :processes_size=>2, :default_queue_latency=>0, :workers_size=>0, :enqueued=>0}>
irb(main):015:0> queue = Sidekiq::Queue.new
=> #<Sidekiq::Queue:0x00000810ff0a38 @name="default", @rname="queue:default">
irb(main):016:0> queue.find_job "5874dd2c051eb1451b00883a"
=> nil
irb(main):017:0> queue = Sidekiq::Queue.new 'critical'
=> #<Sidekiq::Queue:0x00000810fcc5e8 @name="critical", @rname="queue:critical">
irb(main):018:0> queue.find_job "5874dd2c051eb1451b00883a"
=> nil
irb(main):019:0> queue = Sidekiq::Queue.new 'low'
=> #<Sidekiq::Queue:0x00000810f993c8 @name="low", @rname="queue:low">
irb(main):020:0> queue.find_job "5874dd2c051eb1451b00883a"
=> nil
irb(main):021:0>
During my tests I was tailing both my staging log and sidekiq log. I restarted sidekiq just to be sure it was up and running. I flushed my redis datastore. I ensured there was only 1 instance of the sidekiq process running. I double-, triple-checked my 'rspec-sidekiq' gem was defined in the test group.
Nothing. No output in the sidekiq log. No output in the staging log. (I verified file permissions too).
From the rails console session it appears a Job ID is generated and returned. Yet, I can not locate it in the 'critical' queue (like I expected), or the other defined queues.
What other items can I check to help run this down?
Thank you very much, in advance, for any assistance provided.
--Mel