]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/commands/console/class_HubConsoleMainCommand.php
Moved a lot classes, added visitors and methods
[hub.git] / application / hub / main / commands / console / class_HubConsoleMainCommand.php
index c3ece8c2e6ce47e7c7dbf906c4baf2635f10fdc0..c9e4a44b0a5f277e7040fd6c2394724868b7037e 100644 (file)
@@ -94,12 +94,24 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // the attribute $hubIsActive to true
                $nodeInstance->activateHub($requestInstance, $responseInstance);
 
+               // Debug message
+               $this->debugOutput('MAIN: --- Entering main loop. ---');
+
                // ----------------------------- Main loop ----------------------------
                // This is the main loop. Queried calls should come back here very fast
                // so the whole application runs on nice speed. This while-loop goes
                // until the hub is no longer active.
                while ($nodeInstance->isHubActive()) {
+                       // Handle the listeners
+                       // @TODO We may have to catch some exceptions here
+                       $nodeInstance->getListenerPoolInstance()->handleListenerPool();
+
+                       // Handle the qeues
+                       $nodeInstance->getQueryInstance()->handleQueues();
                } // END - while
+
+               // Debug message
+               $this->debugOutput('MAIN: --- Leaving main loop. ---');
        }
 
        /**