]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/commands/console/class_HubConsoleCruncherCommand.php
Added DHT initialization task (see comments below):
[hub.git] / application / hub / main / commands / console / class_HubConsoleCruncherCommand.php
index d62a939d5b55c66c5ad6adf27be327e33561bd77..dd159a089ccd97b250064abf6204a0b8983825d0 100644 (file)
@@ -4,7 +4,7 @@
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Hub Developer Team
+ * @copyright  Copyright (c) 2011 - 2012 Cruncher Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.ship-simu.org
  *
@@ -67,18 +67,21 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable {
                 * 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...');
+               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Beginning with bootstrap...');
                $applicationInstance->getControllerInstance()->executeBootstrapFilters($requestInstance, $responseInstance);
-               $this->debugOutput('BOOTSTRAP: Bootstrap finished.');
+               self::createDebugInstance(__CLASS__)->debugOutput('BOOTSTRAP: Bootstrap finished.');
 
                // Get cruncher instance
                $cruncherInstance = Registry::getRegistry()->getInstance('cruncher');
 
+               // Add some cruncher-specific filters
+               $cruncherInstance->addExtraCruncherFilters();
+
                // Get task handler instance
-               $handlerInstance = Registry::getRegistry()->getInstance('task');
+               $handlerInstance = Registry::getRegistry()->getInstance('task_handler');
 
                // Debug message
-               $this->debugOutput('MAIN: --- Entering main loop. ---');
+               self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Entering main loop. ---');
 
                /*
                 * ----------------------------- Main loop ----------------------------
@@ -92,7 +95,7 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable {
                } // END - while
 
                // Debug message
-               $this->debugOutput('MAIN: --- Leaving main loop. ---');
+               self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Leaving main loop. ---');
        }
 
        /**
@@ -121,7 +124,7 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable {
                //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_task_handler_filter'));
 
                // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_cruncher_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_filter'));
        }
 }