Module: MeRedis::AwsConfigBlocker

Defined in:
lib/me_redis/aws_config_blocker.rb

Overview

how to use: Redis.include( MeRedis::AwsConfigBlocker )

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/me_redis/aws_config_blocker.rb', line 13

def self.prepended(base)
  print <<AWS_MSG
   
   \e[0;33;31;1m!!!!!!!!! MeRedis AWS CONFIG BLOCKER WARNING!!!!!! \e[0;33;31;0m
   You introduced AwsConfigBlocker into the ancestors chain, that means that you intend to skip Redis config call,
   because AWS does not support config get/set calls by throwing an exception. 
   AwsConfigBlocker will block config call from reaching your Redis server!
   
   Don't forget to setup redis param group through the AWS UI with exact values, or you might face unexpected 
   optimization degradation. For more details look into the README section.

AWS_MSG
end

Instance Method Details

#config(*args, &block) ⇒ Object



7
8
9
10
11
# File 'lib/me_redis/aws_config_blocker.rb', line 7

def config( *args, &block )
  print 'config was called, resulting me_config:'
  ap self.class.me_config
  {}
end