Class: SidekiqJobStats::Enqueued
- Inherits:
-
Object
- Object
- SidekiqJobStats::Enqueued
- Defined in:
- lib/sidekiq_job_stats/enqueued.rb
Instance Attribute Summary collapse
-
#job_class ⇒ Object
Returns the value of attribute job_class.
Instance Method Summary collapse
-
#initialize(job_class) ⇒ Enqueued
constructor
A new instance of Enqueued.
- #jobs_enqueued ⇒ Object
- #track ⇒ Object
Constructor Details
#initialize(job_class) ⇒ Enqueued
Returns a new instance of Enqueued.
5 6 7 |
# File 'lib/sidekiq_job_stats/enqueued.rb', line 5 def initialize(job_class) @job_class = job_class end |
Instance Attribute Details
#job_class ⇒ Object
Returns the value of attribute job_class.
3 4 5 |
# File 'lib/sidekiq_job_stats/enqueued.rb', line 3 def job_class @job_class end |
Instance Method Details
#jobs_enqueued ⇒ Object
15 16 17 18 19 |
# File 'lib/sidekiq_job_stats/enqueued.rb', line 15 def jobs_enqueued Sidekiq.redis do |conn| conn.get(job_stats_enqueued_key).to_i end end |
#track ⇒ Object
9 10 11 12 13 |
# File 'lib/sidekiq_job_stats/enqueued.rb', line 9 def track Sidekiq.redis do |conn| conn.incr(job_stats_enqueued_key) end end |