mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
cache: Import random.
This commit is contained in:
committed by
Brian Simpson
parent
28e140d05d
commit
d0beab632e
@@ -40,6 +40,8 @@ from r2.lib.hardcachebackend import HardCacheBackend
|
||||
from r2.lib.sgm import sgm # get this into our namespace so that it's
|
||||
# importable from us
|
||||
|
||||
import random
|
||||
|
||||
# This is for use in the health controller
|
||||
_CACHE_SERVERS = set()
|
||||
|
||||
@@ -924,7 +926,6 @@ class CassandraCache(CacheUtils):
|
||||
return ret
|
||||
|
||||
def _warm(self, keys):
|
||||
import random
|
||||
if False and random.random() > 0.98:
|
||||
print 'Warming', keys
|
||||
self.cf.multiget(keys)
|
||||
|
||||
Reference in New Issue
Block a user