From bb420c41b37f86cdf2b8200b1053c042560d7771 Mon Sep 17 00:00:00 2001 From: Mark Noble Date: Wed, 10 Apr 2024 19:41:29 -0600 Subject: [PATCH] Updates to checking the status of User List and Side Loads indexing --- code/web/release_notes/24.04.00.MD | 1 + code/web/services/API/SearchAPI.php | 4 +++- code/web/sys/DBMaintenance/version_updates/24.04.00.php | 9 +++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/code/web/release_notes/24.04.00.MD b/code/web/release_notes/24.04.00.MD index 1a64d55290..fd319f5066 100644 --- a/code/web/release_notes/24.04.00.MD +++ b/code/web/release_notes/24.04.00.MD @@ -152,6 +152,7 @@ - Remove stray ` mark in advanced search screen and correct spacing between predefined year ranges. (Ticket 130176) (*MDN*) - Correct adding new one to many properties to hide options that should not be visible in lists. (*MDN*) - Correct message when no holds can be frozen or thawed to show the proper alert style. (Ticket 127582) (*MDN*) +- Updates to checking the status of User List and Side Loads indexing. (*MDN*) ## This release includes code contributions from - ByWater Solutions diff --git a/code/web/services/API/SearchAPI.php b/code/web/services/API/SearchAPI.php index 80e86b5956..c3e073455f 100644 --- a/code/web/services/API/SearchAPI.php +++ b/code/web/services/API/SearchAPI.php @@ -407,9 +407,11 @@ function getIndexStatus() { } elseif (empty($sideLoadLogEntry->endTime)){ $sideloadIndexNote .= $sideload->name . ' has not finished indexing on the last 2 tries
'; } - } else { + } else if ($sideload->lastUpdateOfAllRecords == null && $sideload->lastUpdateOfChangedRecords == null){ $sideloadIndexNote .= $sideload->name . ' has never finished indexing
'; } + }elseif ($sideLoadLogEntry->startTime < time() - 24 * 60 * 60){ + $sideloadIndexNote .= $sideload->name . ' has been indexing for more than 24 hours
'; } }else{ if ($sideload->lastUpdateOfAllRecords == null && $sideload->lastUpdateOfChangedRecords == null){ diff --git a/code/web/sys/DBMaintenance/version_updates/24.04.00.php b/code/web/sys/DBMaintenance/version_updates/24.04.00.php index d721353912..5c580d30f0 100644 --- a/code/web/sys/DBMaintenance/version_updates/24.04.00.php +++ b/code/web/sys/DBMaintenance/version_updates/24.04.00.php @@ -123,6 +123,15 @@ function getUpdates24_04_00(): array { 'ALTER TABLE sideload_scopes DROP COLUMN restrictToChildrensMaterial', ] ], //sideload_restrict_scopes_by_audience + 'update_user_list_module_log_settings' => [ + 'title' => 'Update User List Module Log Settings', + 'description' => 'Update User List Module Log Settings', + 'continueOnError' => false, + 'sql' => [ + "UPDATE modules set logClassPath = '/sys/UserLists/ListIndexingLogEntry.php', logClassName='ListIndexingLogEntry', settingsClassPath = '/sys/UserLists/ListIndexingSettings.php', settingsClassName = 'ListIndexingSettings' where name = 'User Lists'", + ] + ], //update_user_list_module_log_settings + //kirstien - ByWater 'self_check_checkout_location' => [