From 051bfb2e8138a921978212ce559adef32203ab5a Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 29 Jul 2023 20:23:43 +0300 Subject: [PATCH] update snap reindex CLI output --- cli/yggo.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cli/yggo.php b/cli/yggo.php index c24d1f2..e2d3cde 100644 --- a/cli/yggo.php +++ b/cli/yggo.php @@ -97,8 +97,12 @@ switch ($argv[1]) { if ($db->addHostPageSnapStorage($hostPageSnap->hostPageSnapId, $crc32name, $hostPageSnap->timeAdded)) { - CLI::success(sprintf(_('register new file location: %s storage: %s index: %s;'), $filename, $name, $i)); + CLI::warning(sprintf(_('register snap #%s file: %s storage: %s index: %s;'), $hostPageSnap->hostPageSnapId, $filename, $name, $i)); } + + } else { + + CLI::success(sprintf(_('skip related snap #%s file: %s storage: %s index: %s;'), $hostPageSnap->hostPageSnapId, $filename, $name, $i)); } } @@ -119,8 +123,11 @@ switch ($argv[1]) { if ($db->addHostPageSnapStorage($hostPageSnap->hostPageSnapId, $crc32name, $hostPageSnap->timeAdded)) { - CLI::success(sprintf(_('register new file location: %s storage: %s index: %s;'), $filename, $name, $i)); + CLI::warning(sprintf(_('register snap #%s file: %s storage: %s index: %s;'), $hostPageSnap->hostPageSnapId, $filename, $name, $i)); } + } else { + + CLI::success(sprintf(_('skip related snap #%s file: %s storage: %s index: %s;'), $hostPageSnap->hostPageSnapId, $filename, $name, $i)); } } } @@ -136,7 +143,7 @@ switch ($argv[1]) { $hostPageSnapsTrashQueue[] = $hostPageSnap->hostPageSnapId; - CLI::warning(sprintf(_('trash snap index: #%s file: %s not found in the any of storage;'), $hostPageSnap->hostPageSnapId, $filename)); + CLI::danger(sprintf(_('trash snap index: #%s file: %s not found in the any of storage;'), $hostPageSnap->hostPageSnapId, $filename)); } } }