Completed
Push — master ( d9f321...c39738 )
by Robin
07:07 queued 03:31
created

LaravelJobHandlerClearLogsJob::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Famdirksen\LaravelJobHandler\Jobs;
4
5
use Famdirksen\LaravelJobHandler\Http\Controllers\CrawlLogController;
6
use Illuminate\Bus\Queueable;
7
use Illuminate\Queue\SerializesModels;
8
use Illuminate\Queue\InteractsWithQueue;
9
use Illuminate\Contracts\Queue\ShouldQueue;
10
use Illuminate\Foundation\Bus\Dispatchable;
11
12
class LaravelJobHandlerClearLogsJob implements ShouldQueue
13
{
14
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
0 ignored issues
show
introduced by
The trait Illuminate\Queue\SerializesModels requires some properties which are not provided by Famdirksen\LaravelJobHan...lJobHandlerClearLogsJob: $id, $class, $relations
Loading history...
15
16
    /**
17
     * Create a new job instance.
18
     *
19
     * @return void
20
     */
21
    public function __construct()
22
    {
23
        $this->queue = config('laravel-job-handler.clear_log_via_job_queue', 'default');
24
    }
25
26
    /**
27
     * Execute the job.
28
     *
29
     * @return void
30
     */
31
    public function handle()
32
    {
33
        $clc = new CrawlLogController();
34
        $clc->clearAllLogs(true);
35
    }
36
}
37