@@ -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 |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $this->log('Checking if crawler is enabled'); |
117 | 117 | if (!$this->crawler->enabled) { |
118 | 118 | $this->log('Crawler is not enabled'); |
119 | - throw new CrawlerException('Crawler (#' . $this->crawler_id . ') - crawler isnt enabled in database'); |
|
119 | + throw new CrawlerException('Crawler (#'.$this->crawler_id.') - crawler isnt enabled in database'); |
|
120 | 120 | } |
121 | 121 | |
122 | 122 | $this->log('Checking if crawler can be runned'); |
@@ -148,16 +148,16 @@ discard block |
||
148 | 148 | } |
149 | 149 | |
150 | 150 | $this->log('Last crawler failed, force run is not enabled'); |
151 | - throw new CrawlerException('Crawler (#' . $this->crawler_id . ') - last run had an error and override_fail_status is not enabled'); |
|
151 | + throw new CrawlerException('Crawler (#'.$this->crawler_id.') - last run had an error and override_fail_status is not enabled'); |
|
152 | 152 | } |
153 | 153 | } else { |
154 | 154 | $this->log('Crawler needs to wait ('.$checkIfCrawlerCanBeRunned['retry_in'].' seconds) before running again'); |
155 | - throw new CrawlerNotReachedTimeBetweenJobsException('Has to wait ' . $checkIfCrawlerCanBeRunned['retry_in'] . ' more seconds to run'); |
|
155 | + throw new CrawlerNotReachedTimeBetweenJobsException('Has to wait '.$checkIfCrawlerCanBeRunned['retry_in'].' more seconds to run'); |
|
156 | 156 | } |
157 | 157 | |
158 | 158 | if ($x == $times) { |
159 | 159 | $this->log('Crawler exceeded the max execution time'); |
160 | - $this->failCrawler('Crawler (#' . $this->crawler_id . ') - max execution time'); |
|
160 | + $this->failCrawler('Crawler (#'.$this->crawler_id.') - max execution time'); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | if ($this->crawler->status == 1) { |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | |
290 | 290 | CrawlerStatusLogs::insert($formatted_logs); |
291 | 291 | |
292 | - $this->log('Registered crawler logs (count: ' . count($formatted_logs) . ')'); |
|
292 | + $this->log('Registered crawler logs (count: '.count($formatted_logs).')'); |
|
293 | 293 | } else { |
294 | 294 | $this->log('Log output is not set, skipping inserting'); |
295 | 295 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::deleting(function ($item) { |
|
21 | + static::deleting(function($item) { |
|
22 | 22 | $item->logs() |
23 | 23 | ->delete(); |
24 | 24 | }); |