From c018d8c0b7eb0292258a071eaeedd3998a73385e Mon Sep 17 00:00:00 2001 From: Daniel Tartavel Date: Wed, 14 Dec 2022 11:00:16 +0100 Subject: [PATCH] test de viteese de boucle principale --- moha.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/moha.php b/moha.php index e66fe9e..5fca957 100644 --- a/moha.php +++ b/moha.php @@ -387,6 +387,7 @@ configWatchInit(); while (true) { // test if looping is more then 5 second and send and alert + echo date("c") . " début"; $now = new datetime("now"); $testTime = clone $now; $testTime->modify("-5 second"); @@ -397,14 +398,14 @@ while (true) $timeLoop = $now; $client->loop(); // mqtt server loop() - +echo date("c") . " One shot"; if ($oneshot === false) // execute while the first loop :WARNING hooks may not be initialized { logger(DEBUG, _("Oneshot part of loop"), __FILE__ . ":" . __LINE__, false); pws2mqttGetList(); $oneshot = true; } - +echo date("c") . " initialisation des hooks"; if($hooksInitialized == 0) // all hooks are not initialized { $i = 1; @@ -431,11 +432,13 @@ while (true) { //logger(DEBUG, _("looping"), __FILE__ . ":" . __LINE__); } + echo date("c") . " chech events"; checkEvents(); + echo date("c") . " topics availabiblity"; checkTopicsAvailability(); - +echo date("c") . " apiserver"; if ($apiServerIsActive) apiServer($read); - +echo date("c") . " surveillance Configuration"; // surveillance du dossier de configuration if ($cwfd !== false) { @@ -455,6 +458,7 @@ while (true) } } } +echo date("c") . " fin"; } endMoha();