[wopi] Fix bug with cleanupCache after forcesave and opening collaborative tab if SupportsLocks=false; revert unplanned changes in config

This commit is contained in:
Sergey Konovalov
2024-10-07 14:11:38 +03:00
parent 73968214a5
commit 34c0311443
2 changed files with 5 additions and 5 deletions

View File

@ -350,11 +350,11 @@
"forcesave": 604800,
"forcesaveLock": 5000,
"saved": 3600,
"documentsCron": "*/10 * * * * *",
"documentsCron": "0 */2 * * * *",
"files": 86400,
"filesCron": "00 00 */1 * * *",
"filesremovedatonce": 100,
"sessionidle": "10s",
"sessionidle": "1h",
"sessionabsolute": "30d",
"sessionclosecommand": "2m",
"pemStdTTL": "1h",
@ -455,7 +455,7 @@
"license" : {
"license_file": "",
"warning_limit_percents": 70,
"packageType": 1,
"packageType": 0,
"warning_license_expiration": "30d"
},
"FileConverter": {

View File

@ -421,7 +421,7 @@ function checkAndInvalidateCache(ctx, docId, fileInfo) {
let hasUnlockMarker = isWopiUnlockMarker(unlockMarkStr);
let isUpdateVersion = commonDefines.FileStatus.UpdateVersion === row.status;
ctx.logger.debug('wopiEditor hasUnlockMarker=%s isUpdateVersion=%s', hasUnlockMarker, isUpdateVersion);
if (hasUnlockMarker || isUpdateVersion || !commonInfo.fileInfo.SupportsLocks) {
if (hasUnlockMarker || isUpdateVersion) {
let fileInfoVersion = fileInfo.Version;
let cacheVersion = commonInfo.fileInfo.Version;
let fileInfoModified = fileInfo.LastModifiedTime;
@ -905,10 +905,10 @@ async function unlock(ctx, wopiParams) {
ctx.logger.debug('wopi Unlock request uri=%s headers=%j', uri, headers);
let postRes = await utils.postRequestPromise(ctx, uri, undefined, undefined, undefined, tenCallbackRequestTimeout, undefined, headers);
ctx.logger.debug('wopi Unlock response headers=%j', postRes.response.headers);
res = true;
} else {
ctx.logger.info('wopi SupportsLocks = false');
}
res = true;
} catch (err) {
ctx.logger.error('wopi error Unlock:%s', err.stack);
} finally {