Class: AppStatus::Adapters::Redis

Inherits:
Object
  • Object
show all
Defined in:
lib/app_status/adapters/redis.rb

Class Method Summary collapse

Class Method Details

.statusObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/app_status/adapters/redis.rb', line 4

def self.status
  if defined?(::Redis)
    ::Redis.current.ping == 'PONG' ? 'OK' : 'o_O'
  else
    'N/A'
  end
rescue => e
  AppStatus.logger.error "STATUS ERROR: #{adapter_name}"
  AppStatus.logger.error e
  'Down'
end