]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php
Continued with crawler:
[hub.git] / application / hub / main / tasks / crawler / url_source / class_CrawlerUrlSourceLocalStartTask.php
index 5938d2cb75647e4a6cb5056f2760bec8adec65dc..eb2839eb93f99c1bfde221e10bd393286c66462b 100644 (file)
@@ -63,8 +63,20 @@ class CrawlerUrlSourceLocalStartTask extends BaseUrlSourceTask implements Taskab
         * @return      void
         */
        public function executeTask () {
-               // Get the URL source instance and announce us
-               $this->getSourceInstance()->fillUrlStack();
+               // Get source instance
+               $sourceInstance = $this->getUrlSourceInstance();
+
+               // Is it not set?
+               if (is_null($sourceInstance)) {
+                       // Initialize it
+                       $this->initUrlSourceTask();
+
+                       // And re-get it
+                       $sourceInstance = $this->getUrlSourceInstance();
+               } // END - if
+
+               // Get the URL source instance and fill the stack with crawl entries
+               $sourceInstance->fillUrlStack();
        }
 }