Browse Source

UPD: Engine

Giancarlo Voci 7 years ago
parent
commit
ae6fa9ab1b

+ 2 - 0
cfg/config.ini

@@ -34,3 +34,5 @@ pass=ZrgzkvJrOKnNSCnPnGz3u{A6eHSNXVvs
 
 [FINDBOXSERVICE]
 SLEEPTIME=500
+; Seconds to wait for set findbox service not available
+GRACE_PERIOD_SEC=30

+ 0 - 1
src/OpenMind/FindBox/FindBoxCoreSystem.php

@@ -194,5 +194,4 @@ class FindBoxCoreSystem
 
     return $fbOS_Response['value']['value'];
   }
-
 }

+ 1 - 4
src/OpenMind/FindBox/FindBoxService.php

@@ -144,7 +144,7 @@ class FindBoxService
 
       $this->getCurrentQueue();
 
-      foreach($this->labelToBlink as $labelId => &$label) {
+      foreach ($this->labelToBlink as $labelId => &$label) {
         switch ($label->operation) {
 
           case Q_BLINK_OFF:
@@ -192,12 +192,9 @@ class FindBoxService
         }
       }
 
-      ob_flush();
-      flush();
       usleep($f3->get('FINDBOXSERVICE.SLEEPTIME') * 1000);
     }
 
     return;
   }
-
 }

+ 1 - 1
src/OpenMind/System/System.php

@@ -95,7 +95,7 @@ class System extends PluginStrategy
     $qs = new QueueSystem('FindBoxService_isAlive');
     if (!$qs->check()) {
       $lastUpdate = time() - $qs->command;
-      if ($lastUpdate > ($f3->get('FINDBOXSERVICE.SLEEPTIME') / 1000) * 2) { // attende il doppio del tempo
+      if ($lastUpdate > $f3->get('FINDBOXSERVICE.GRACE_PERIOD_SEC')) {
         $omlNotifications = new Notifications();
         $omlNotifications->notify(Notifications::FB_NOTALIVE, 'Errore: Servizio di FindBox non disponibile');
       } else {