]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/commands/console/class_HubConsoleMainCommand.php
Crunchers may have have own filters
[hub.git] / application / hub / main / commands / console / class_HubConsoleMainCommand.php
index e9140aa8b38aeb9e117385143a60112d3190bc02..ee71aaa6cf2bc33f65a321306b5526bd600bc1df 100644 (file)
@@ -61,10 +61,12 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // Get a registry and the application instance from it
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
-               // ----------------------- Bootstrapping phase ------------------------
-               // Try to bootstrap the node and pass the request instance to it for
-               // extra arguments which mostly override config entries or enable special
-               // features within the hub (none is ready at this development stage)
+               /*
+                * ----------------------- Bootstrapping phase ------------------------
+                * Try to bootstrap the node and pass the request instance to it for
+                * extra arguments which mostly override config entries or enable special
+                * features within the hub (none is ready at this development stage)
+                */
                $this->debugOutput('BOOTSTRAP: Beginning with bootstrap...');
                $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance);
                $this->debugOutput('BOOTSTRAP: Bootstrap finished.');
@@ -75,9 +77,11 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // Add some node-specific filters, e.g. announcement
                $nodeInstance->addExtraNodeFilters();
 
-               // -------------------------- Hub activation --------------------------
-               // Activates the hub by doing some final preparation steps and setting
-               // the attribute $hubIsActive to true
+               /*
+                * -------------------------- Hub activation --------------------------
+                * Activates the node by doing some final preparation steps and setting
+                * the attribute $hubIsActive to true
+                */
                $nodeInstance->activateNode($requestInstance, $responseInstance);
 
                // Get task handler instance
@@ -86,10 +90,12 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                // 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 or all tasks are killed.
+               /*
+                * ----------------------------- 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 or all tasks are killed.
+                */
                while (($nodeInstance->getIsActive()) && ($handlerInstance->hasTasksLeft())) {
                        // Handle all tasks here
                        $handlerInstance->handleTasks();
@@ -118,7 +124,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_sessionid_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_restore_nodelist_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_init_queues_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrap_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrapping_filter'));
                $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_listener_pool_filter'));
 
                // Add hub activation filters
@@ -129,7 +135,7 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_deinit_queues_filter'));
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_task_handler_filter'));
 
-               // This is the last generic filter
+               // This is the last generic shutdown filter
                $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_node_filter'));
        }
 }