]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php
A lot new methods/class added and many cleanups:
[hub.git] / application / hub / main / filter / task / cruncher / class_CruncherTaskHandlerInitializerFilter.php
index 895223257344cd420986505baf1f99ff1ddda2b4..15152b2e7eeedd127853ddce6919a041771bd147 100644 (file)
@@ -52,7 +52,7 @@ class CruncherTaskHandlerInitializerFilter extends BaseFilter implements Filtera
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
         * @throws      FilterChainException    If we need to interrupt the filter chain
-        * @todo        0% done
+        * @todo        5% done
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
                // Get cruncher instance
@@ -61,6 +61,11 @@ class CruncherTaskHandlerInitializerFilter extends BaseFilter implements Filtera
                // Get a new task handler instance
                $handlerInstance = ObjectFactory::createObjectByConfiguredName('task_handler_class');
 
+               // Register all tasks:
+               // 1) A task for fetching WUs (work units)
+               $taskInstance = ObjectFactory::createObjectByConfiguredName('cruncher_work_unit_fetcher_task_class');
+               $handlerInstance->registerTask('cruncher_work_unit_fetcher', $taskInstance);
+
                // Put the task handler in registry
                Registry::getRegistry()->addInstance('task', $handlerInstance);
        }