Class: UpdateRedisCacheStatsWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/update_redis_cache_stats_worker.rb

Overview

Background worker to update stats for the Redis instance serving as Rails cache backend. Stats are then visualized with Redmon, accessible at the /redmon path.

This is a Sidekiq worker

Instance Method Summary collapse

Instance Method Details

#performObject

Update stats (memory use, configuration, last time saved etc) from the Redis instance serving as Rails cache backend. Stats can be visualized with Redmon, accessible at the /redmon path.


19
20
21
22
23
24
# File 'app/workers/update_redis_cache_stats_worker.rb', line 19

def perform
  Rails.logger.debug 'Updating Redmon stats for the Redis rails cache instance'
  worker = Redmon::Worker.new
  worker.record_stats
  worker.cleanup_old_stats
end