Skip to content

Commit

Permalink
Merge branch 'pu/ps/rt/238203' into '2023.11'
Browse files Browse the repository at this point in the history
fix(Tinebase/FileSystem): preview nodes might no longer exist

See merge request tine20/tine20!5532
  • Loading branch information
pschuele committed Jun 24, 2024
2 parents e1eabe3 + 3174c7b commit 4698aaf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 6 additions & 0 deletions docs/operators/howto/tine20AdminQueue.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 8 additions & 3 deletions tine20/Tinebase/FileSystem/Previews.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4698aaf

Please sign in to comment.