caches: pass synchronize session to cleanup cache_keys to fix some errors
This commit is contained in:
parent
d8be76e7ab
commit
c07d61211b
1 changed files with 2 additions and 1 deletions
|
|
@ -40,7 +40,8 @@ def free_cache_keys(*args):
|
|||
try:
|
||||
for cache_proc in cache_keys_by_pid:
|
||||
like_expression = '{}%'.format(cache_proc)
|
||||
CacheKey.query().filter(CacheKey.cache_key.like(like_expression)).delete()
|
||||
CacheKey.query().filter(
|
||||
CacheKey.cache_key.like(like_expression)).delete(synchronize_session='fetch')
|
||||
cache_keys_by_pid.remove(cache_proc)
|
||||
Session().commit()
|
||||
except Exception:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue