Commit Graph

26 Commits

Author SHA1 Message Date
Radu Ioan Fericean 0900a3ddb9 discovered and use _compat to_bytes and to_native functions 2018-04-14 14:58:53 +03:00
Radu Ioan Fericean 086bfb5851 fix redis sessions and redis for python3 2018-04-14 14:33:37 +03:00
mdipierro 6ed204301d ok dropped backward compatibility in redis_*.py 2016-03-24 12:08:43 -05:00
mdipierro 4c5664f701 backward compatible syntax for redis 2016-03-23 19:14:37 -05:00
niphlod 1b15b0c6dc fixes just docstrings about usage 2016-03-14 23:32:53 +01:00
niphlod 12acdb51d7 new redis toolset to use with web2py
This is a refactor of everything web2py uses with redis.
Specifically:
- a refactored redis_cache.py that fixes #958, allowing a "fail
gracefully" behaviour in case redis is not available
- a refactored redis_session.py that blocks less with with_lock=True
(although still not optimal)
- a new (and NEEDED) redis_utils.py that serves as the base for
everything else, allowing an RConn object that you can freely use as a
redis.StrictRedis connection, and that you can override in case you're
using a different library (or that web2py will use in case redis-py
won't be the de-facto standard around)
- a newly - and much anticipated - redis_scheduler.py. It's a slip-in
replacement for the standard scheduler that uses redis for workers
coordination. Feel free to dig in the code and improve it.

For redis_cache and redis_session changes are BREAKING. It means that
users will need to change the import locations and tune a bit the code.
Now every module depends on an gluon.contrib.redis_utils.RConn object
(or similar) that in turns is very similar to a redis.StrictRedis one.
The redis instance is EXTERNAL to the modules themselves (no more "host,
port, db, password" parameters in RedisCache or RedisSession)
See the relevant docstrings for usage examples
2016-01-02 23:15:00 +01:00
niphlod 3291075384 fixes issue with deleting sessions 2015-03-21 21:54:29 +01:00
niphlod 6403878f95 refactored pickle everywhere but Session, removed unused imports 2014-09-10 19:12:10 +02:00
alex 98cd10c6f5 Fix for session unique_key query 2014-03-08 14:37:15 -05:00
alex 31fcf51506 Added password option for redis_cache and redis_session 2014-02-24 19:01:27 -05:00
niphlod 5951ce2aef fixed redis_session.py, thanks @Giovanni for pointing 2013-09-09 21:32:26 +02:00
Ricardo Pedroso a4e0fb34c2 support new session logic 2013-08-24 15:33:41 +01:00
niphlod 8fe821ed0c standardized keyprefix 2013-08-20 20:59:14 +02:00
gi0baro 05f3e01ece Fix in redis_session.py select: prevent errors when value is integer/long 2013-08-20 16:53:08 +02:00
niphlod bb7715445a fix issue 1592 2013-07-17 23:18:04 +02:00
Ricardo Pedroso 15263ea1d6 add missing client parameter to lua script 2013-05-18 22:26:35 +01:00
Ricardo Pedroso 693c5cd5e4 add an optional lock mechanism to redis sessions 2013-05-18 20:36:53 +01:00
Ricardo Pedroso cc3f045efa get rid of val == dict() 2013-05-18 20:36:53 +01:00
Ricardo Pedroso 4c1dbf4e40 one redis instance per application 2013-05-13 21:59:04 +01:00
Ricardo Pedroso c20c055788 typo: self.session.expiry -> self.session_expiry 2013-05-13 21:31:06 +01:00
Ricardo Pedroso 44c13f9fa3 fix missing variable 2013-05-13 21:29:37 +01:00
mdipierro 6aa5edc7ff many pep8 improvements 2012-10-19 12:33:53 -05:00
mdipierro 71ec15190b some pep8 changes (fixed spacing at end) 2012-10-19 10:37:07 -05:00
mdipierro 3a66f5e330 fixed some pep8 stuff 2012-10-19 09:40:17 -05:00
mdipierro d8d85815ad redis session patch, thanks Niphlod 2012-10-13 09:26:53 -05:00
Massimo 45dd57e49e redis_sessions.py, thanks Niphlod 2012-10-09 14:36:34 -05:00