cache: use global flock to prevent recursion when using gevent workers.
This commit is contained in:
parent
3f25bc4e13
commit
2ae54defd8
1 changed files with 4 additions and 2 deletions
|
|
@ -82,12 +82,14 @@ class Serializer(object):
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
|
import fcntl
|
||||||
|
flock_org = fcntl.flock
|
||||||
|
|
||||||
|
|
||||||
class CustomLockFactory(FileLock):
|
class CustomLockFactory(FileLock):
|
||||||
|
|
||||||
@memoized_property
|
@memoized_property
|
||||||
def _module(self):
|
def _module(self):
|
||||||
import fcntl
|
|
||||||
flock_org = fcntl.flock
|
|
||||||
|
|
||||||
def gevent_flock(fd, operation):
|
def gevent_flock(fd, operation):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue