first attempt at suppressing distributed lock release errors
jvanasco
Branch: jvanasco/dogpile.cache:feature-distributed_lock_fix
Branch: zzzeek/dogpile.cache:master
Declined
Declined pull request
Rescinding. Better to make lock_cls pluggable as suggested.
Closed by: jvanasco·2016-07-06
This is an approach to solving https://bitbucket.org/zzzeek/dogpile.cache/issues/77/handling-redis-lock-timeouts
A
RedisDistributedLockProxy
class is used to wrap the lock and suppress errors on release. It is enabled by sending the argumentlock_safe_release = True
The test-suite was amended to test for this. The tests against get_or_create and get_or_create_multi simply sleep for 1 second longer than the lock timeout.