2

I am calling a redis command:

$redis.call ["MEMORY", "USAGE", "Job--9813"]

and when doing this I get a message logged:

Passing 'call' command to redis as is;
blind passthrough has been deprecated and will be removed in redis-namespace 2.0
(at (pry):37in '<main>')

I understand the warning but want to run the code anyway (for hundreds of thousands of keys) without spamming my terminal with these messages. How can i figure out where the message came from? I searched on the redis-rb repo, and couldn't find anything. How can I disable it?

max pleaner
  • 26,189
  • 9
  • 66
  • 118

2 Answers2

3

It's a Kernel.warn call in redis-namespace.

You can disable warnings in Ruby with the -W0 command line option.

More info on disabling warnings here:
Suppress Ruby warnings when running specs

Casper
  • 33,403
  • 4
  • 84
  • 79
0

There are several reasons you may want to consider being rid of redis-namespace altogether.

First of all, Redis already has a built-in namespacing mechanism called "Databases".

You can read more about it here: http://www.mikeperham.com/2015/09/24/storing-data-with-redis/#data-partitioning

Kache
  • 15,647
  • 12
  • 51
  • 79
  • Fair enough but I am just investigating the existing Redis setup of the company I recently joined, not adding this gem myself :) – max pleaner Nov 25 '19 at 23:03