@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('crawler_status_logs', function (Blueprint $table) { |
|
| 16 | + Schema::create('crawler_status_logs', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | |
| 19 | 19 | $table->integer('status_id'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('crawler_statuses', function (Blueprint $table) { |
|
| 16 | + Schema::create('crawler_statuses', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | |
| 19 | 19 | $table->integer('crawler_id'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('crawlers', function (Blueprint $table) { |
|
| 16 | + Schema::create('crawlers', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | |
| 19 | 19 | $table->string('name'); |
@@ -13,8 +13,8 @@ |
||
| 13 | 13 | protected $table = 'crawlers'; |
| 14 | 14 | |
| 15 | 15 | protected $fillable = [ |
| 16 | - 'name', |
|
| 17 | - 'description' |
|
| 16 | + 'name', |
|
| 17 | + 'description' |
|
| 18 | 18 | ]; |
| 19 | 19 | |
| 20 | 20 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | $this->getCrawler(); |
| 82 | 82 | |
| 83 | 83 | if (!$this->crawler->enabled) { |
| 84 | - throw new CrawlerException('Crawler (#' . $this->crawler_id . ') - crawler isnt enabled in database'); |
|
| 84 | + throw new CrawlerException('Crawler (#'.$this->crawler_id.') - crawler isnt enabled in database'); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | $checkIfCrawlerCanBeRunned = $this->canCrawlerRunAfterPeriod(); |
@@ -98,14 +98,14 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | |
| 100 | 100 | if ($this->crawler->latest_status == 3) { |
| 101 | - throw new CrawlerException('Crawler (#' . $this->crawler_id . ') - last run had an error'); |
|
| 101 | + throw new CrawlerException('Crawler (#'.$this->crawler_id.') - last run had an error'); |
|
| 102 | 102 | } |
| 103 | 103 | } else { |
| 104 | - throw new CrawlerNotReachedTimeBetweenJobsException('Has to wait ' . $checkIfCrawlerCanBeRunned['retry_in'] . ' more seconds to run'); |
|
| 104 | + throw new CrawlerNotReachedTimeBetweenJobsException('Has to wait '.$checkIfCrawlerCanBeRunned['retry_in'].' more seconds to run'); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | 107 | if ($x == $times) { |
| 108 | - $this->failCrawler('Crawler (#' . $this->crawler_id . ') - max execution time'); |
|
| 108 | + $this->failCrawler('Crawler (#'.$this->crawler_id.') - max execution time'); |
|
| 109 | 109 | } |
| 110 | 110 | |
| 111 | 111 | if ($this->crawler->status == 1) { |