1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-05-13 10:25:46 +00:00

Merge pull request from haiwen/onlyoffice-log

update onlyoffice log when no doc_key in cache
This commit is contained in:
Daniel Pan 2021-06-11 15:03:45 +08:00 committed by GitHub
commit 4b9837f734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,8 +73,10 @@ def get_onlyoffice_dict(request, username, repo_id, file_path, file_id='',
if not doc_key:
doc_key = cache.get(cache_key)
# In theory, file is unlocked when editing finished.
# This can happend if memcache is restarted or memcache is full and doc key is deleted.
if not doc_key and if_locked_by_online_office(repo_id, file_path):
logger.error('no doc_key in cache and locked by online office')
logger.warning('no doc_key in cache and file({} in {}) is locked by online office'.format(file_path, repo_id))
if not doc_key:
info_bytes = force_bytes(origin_repo_id + origin_file_path + file_id)