test de viteese de boucle principale
This commit is contained in:
parent
8974d3de84
commit
c018d8c0b7
12
moha.php
12
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();
|
||||
|
Loading…
Reference in New Issue
Block a user