ok dropped backward compatibility in redis_*.py
This commit is contained in:
@@ -15,7 +15,7 @@ import random
|
||||
from gluon import current
|
||||
from gluon.cache import CacheAbstract
|
||||
from gluon.contrib.redis_utils import acquire_lock, release_lock
|
||||
from gluon.contrib.redis_utils import register_release_lock, RConnectionError, RConn
|
||||
from gluon.contrib.redis_utils import register_release_lock, RConnectionError
|
||||
|
||||
logger = logging.getLogger("web2py.cache.redis")
|
||||
|
||||
@@ -81,11 +81,6 @@ def RedisCache(redis_conn=None, debug=False, with_lock=False, fail_gracefully=Fa
|
||||
- we scan the keys and then delete them
|
||||
"""
|
||||
|
||||
# for backward compatibility
|
||||
if isinstance(redis_conn, str):
|
||||
host, port = redis_conn.split(':')
|
||||
redis_conn = RConn(host=host, port=int(port), db=db)
|
||||
|
||||
locker.acquire()
|
||||
try:
|
||||
instance_name = 'redis_instance_' + current.request.application
|
||||
|
||||
@@ -11,7 +11,7 @@ import logging
|
||||
import thread
|
||||
from gluon import current
|
||||
from gluon.storage import Storage
|
||||
from gluon.contrib.redis_utils import acquire_lock, release_lock, RConn
|
||||
from gluon.contrib.redis_utils import acquire_lock, release_lock
|
||||
from gluon.contrib.redis_utils import register_release_lock
|
||||
|
||||
logger = logging.getLogger("web2py.session.redis")
|
||||
@@ -39,11 +39,6 @@ def RedisSession(redis_conn, session_expiry=False, with_lock=False, db=None):
|
||||
Simple slip-in storage for session
|
||||
"""
|
||||
|
||||
# for backward compatibility
|
||||
if isinstance(redis_conn, str):
|
||||
host, port = redis_conn.split(':')
|
||||
redis_conn = RConn(host=host, port=int(port), db=db)
|
||||
|
||||
locker.acquire()
|
||||
try:
|
||||
instance_name = 'redis_instance_' + current.request.application
|
||||
|
||||
Reference in New Issue
Block a user