From 450b4f8ee76829b8bccbf2a80cb8d4319cd4329a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCle?= Date: Mon, 24 Jun 2024 11:19:23 +0200 Subject: [PATCH 1/2] fix(Tinebase/FileSystem): preview nodes might no longer exist ... not catching the 404 would add the jobs to the queue over and over again --- tine20/Tinebase/FileSystem/Previews.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tine20/Tinebase/FileSystem/Previews.php b/tine20/Tinebase/FileSystem/Previews.php index 831083a888..76b01ac22b 100644 --- a/tine20/Tinebase/FileSystem/Previews.php +++ b/tine20/Tinebase/FileSystem/Previews.php @@ -180,11 +180,16 @@ protected function _getConfig($_image = false) * @param string|Tinebase_Model_Tree_Node $_id * @param int $_revision * @return bool - * @throws Zend_Db_Statement_Exception + * @throws Zend_Db_Statement_Exception|Tinebase_Exception */ - public function createPreviews($_id, $_revision = null) + public function createPreviews($_id, $_revision = null): bool { - $node = $_id instanceof Tinebase_Model_Tree_Node ? $_id : $this->_fsController->get($_id, $_revision); + try { + $node = $_id instanceof Tinebase_Model_Tree_Node ? $_id : $this->_fsController->get($_id, $_revision); + } catch (Tinebase_Exception_NotFound $tenf) { + Tinebase_Core::getLogger()->notice(__METHOD__ . '::' . __LINE__ . ' ' . $tenf->getMessage()); + return false; + } try { return $this->createPreviewsFromNode($node); From 3174c7b79e826b31405c8527d1a753b41a615b97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCle?= Date: Mon, 24 Jun 2024 11:19:45 +0200 Subject: [PATCH 2/2] docs(operators/ActionQueue): add clearing the queue with docker setup --- docs/operators/howto/tine20AdminQueue.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/operators/howto/tine20AdminQueue.md b/docs/operators/howto/tine20AdminQueue.md index 74932fe8b2..35fd48ef0a 100644 --- a/docs/operators/howto/tine20AdminQueue.md +++ b/docs/operators/howto/tine20AdminQueue.md @@ -58,6 +58,12 @@ oder redis-cli -h redis.host EVAL "return redis.call('del', 'defaultKey',unpack(redis.call('keys', ARGV[1])))" 0 tine20worker_* + +Docker setup (container name "tine20-cache-1" may vary): + + docker exec -it tine20-cache-1 sh + redis-cli --scan --pattern 'actionqueue*' | xargs -L 1000 redis-cli unlink + eintrag in der queue anschauen redis-cli hval tine20workerData:UUID