[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [BP][UPD] tiki-monitor.php: Add SchedulerLastRun and SchedulerHealthy monitoring metrics

"Sammy Ndabo \(@ndabosam084\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a1e8cd577659_38193f48907f2@gitlab-sidekiq-low-urgency-cpu-bound-v2-5f66f86c7b-gz8vj.mail>

Sammy Ndabo pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
10e7e611 by Sammy Ndabo at 2026-06-02T07:50:35+00:00
[BP][UPD] tiki-monitor.php: Add SchedulerLastRun and SchedulerHealthy monitoring metrics
---
* [FIX] ConsoleApplicationBuilder.php: fix console command lookup when reusing cached instances
---
* [REF] ConsoleApplicationBuilder.php: remove the default 1100 value to callers

* [FIX] ConsoleApplicationBuilder.php: revert to the previous constants declaration

* [REM] ConsoleApplicationBuilder: completely removed the called command parameter and update all the callers

* [FIX] ConsoleApplicationBuilder.php: cache only fully initialized console instance

* [FIX] ConsoleApplicationBuilder.php: fix console command lookup when reusing cached instances

See merge request tikiwiki/tiki!10127

(cherry picked from commit bf52c5ea584dfd72b27a52cecb64d397d884a8fd)

* [UPD] tiki-monitor.php: Add SchedulerLastRun and SchedulerHealthy monitoring metrics
---
* [UPD] tiki-monitor.php: Add SchedulerLastRun and SchedulerHealthy monitoring metrics

See merge request tikiwiki/tiki!9994

(cherry picked from commit ab1110329d4fea4dc36ea4e2262244e337d77b6f)

See merge request tikiwiki/tiki!10420

- - - - -


2 changed files:

- lib/core/Tiki/Command/ConsoleApplicationBuilder.php
- lib/core/Tiki/Package/Extension/Extension.php


Changes:

=====================================
lib/core/Tiki/Command/ConsoleApplicationBuilder.php
=====================================
@@ -530,13 +530,17 @@ class ConsoleApplicationBuilder
      * Iterates over all commands in the list, and registers / doesn't register the commands in accordance with the result
      * of the check function and the action configured for the command group
      *
-     * @param boolean $returnLastInstance
+     * @param int|bool $statusCode
      * @return Application
      */
     public function create($statusCode = 1100): Application
     {
         global $tikipath;
 
+        if (is_bool($statusCode)) {
+            $statusCode = 1100;
+        }
+
         if (self::$lastInstance) {
             return self::$lastInstance;
         }
@@ -556,8 +560,6 @@ class ConsoleApplicationBuilder
         $console->setName(tra('Tiki Console Tool'));
         $console->setCatchExceptions(false);
 
-        $commandCalled = $_SERVER['argv'][1] ?? false;
-
         /**
          * @var  $condition string  The name of the check method to be executed
          * @var  $actions   array   List of actions that should apply to a group of commands
@@ -619,10 +621,6 @@ class ConsoleApplicationBuilder
                     }
                 }
                 $console->add($command);
-                // If the command exactly matches one that was requested, stop processing further commands as they will not be used anyhow.
-                if ($commandCalled === $command->getName()) {
-                    break 2;
-                }
             }
         }
 


=====================================
lib/core/Tiki/Package/Extension/Extension.php
=====================================
@@ -245,7 +245,7 @@ class Extension
         foreach ($finder->in($path)->depth('== 0')->directories() as $themeDir) {
             try {
                 $consoleBuilder = new ConsoleApplicationBuilder();
-                $console = $consoleBuilder->create(true);
+                $console = $consoleBuilder->create();
                 $command = $console->find($commandName);
 
                 $themeName = basename($themeDir);



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/10e7e6110c67958071d08cd265e67c122426a096

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/10e7e6110c67958071d08cd265e67c122426a096
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.