On Friday, April 20, 2018 at 10:47:10 AM UTC-4, Lisandro wrote:
>
> Thank you very much for your time Anthony.
>
> Yes, I use Redis with_lock=True.
> I checked but there is no *__lock key stored in Redis. I double checked 
> that.
>
> But, giving you mentioned with_lock, I tried to set with_lock=False, and 
> it worked. 
> Then I set with_lock=True again, and it worked too.
> *Apparently, the problem went away after executing the request one time 
> with_lock=False, and then I could set it back to True and it kept working 
> ok*.
>
> I'm using an old version of web2py (2.10).
>

Looking at the code 
<https://github.com/web2py/web2py/blob/R-2.10.1/gluon/contrib/redis_cache.py#L140>
 
under 2.10, it is not clear what the problem could be, as the locking code 
is in a try block and there is a "finally" clause that deletes the lock key 
if there is an exception.

The current code in master looks like it could result in a lock being stuck 
if an exception occurs while storing or retrieving a cache item.

Anthony

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to