From 8f7e18c9454e859d3d4088fc4c6ba8e368b3f912 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 8 Feb 2021 18:46:04 +0300 Subject: [PATCH] moving to new implementation of .checkIndex(..), still need testing... Signed-off-by: Alex A. Naanou --- Viewer/features/filesystem.js | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/Viewer/features/filesystem.js b/Viewer/features/filesystem.js index 346c5053..931f659f 100755 --- a/Viewer/features/filesystem.js +++ b/Viewer/features/filesystem.js @@ -790,22 +790,7 @@ var FileSystemLoaderActions = actions.Actions({ // // XXX prevent calling too often... // // XXX // that.checkIndex() } - checkIndex: ['File/Check index consistency', - core.doc`Check index consistency... - - Check currently loaded index for missing references and fix them - if found. - - This will: - - remove references to non-existing preview images (image.preview) - - remove references to non-existing .path (image.path) - - if .path removed, set to largest available preview - - - NOTE: currently this is disabled for merged indexes, need to load - and check individually... - - `, + _checkIndex: ['File/Check index consistency', function(logger){ var that = this logger = logger || this.logger @@ -863,7 +848,19 @@ var FileSystemLoaderActions = actions.Actions({ // need to save the check results... // XXX update .handlers to maintain .changes via promise... checkIndexPaths: ['- File/', - core.doc``, + core.doc`Check index image path consistency + + Check currently loaded index for missing references and fix them + if found. + + This will: + - remove references to non-existing preview images (image.preview) + - remove references to non-existing .path (image.path) + + + NOTE: currently this is disabled for merged indexes, need to load + and check individually... + `, core.sessionQueueHandler('checkIndex', function(queue, ...args){ // XXX ignore merged index... @@ -890,8 +887,7 @@ var FileSystemLoaderActions = actions.Actions({ return updated ? gid : [] })], - //checkIndex: ['File/Check index consistency', - _checkIndex: ['File/', + checkIndex: ['File/Check index consistency', core.doc``, function(options={}){ var context =