@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Queue; |
| 4 | 4 | use Illuminate\Support\ServiceProvider; |
| 5 | -use Illuminate\Support\Facades\Log; |
|
| 6 | 5 | |
| 7 | 6 | class QwatcherServiceProvider extends ServiceProvider |
| 8 | 7 | { |
@@ -18,15 +18,15 @@ discard block |
||
| 18 | 18 | */ |
| 19 | 19 | public function boot() |
| 20 | 20 | { |
| 21 | - Queue::before(function ($job) { |
|
| 21 | + Queue::before(function($job) { |
|
| 22 | 22 | Qwatch::tracks(new ProcessTracks($job->job->getJobId(), $job->job)); |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | - Queue::after(function ($job) { |
|
| 25 | + Queue::after(function($job) { |
|
| 26 | 26 | Qwatch::tracks(new SucceedTracks($job->job->getJobId(), $job->job)); |
| 27 | 27 | }); |
| 28 | 28 | |
| 29 | - Queue::failing(function (JobFailed $job) { |
|
| 29 | + Queue::failing(function(JobFailed $job) { |
|
| 30 | 30 | // dd($event); |
| 31 | 31 | Qwatch::tracks(new FailedTracks($job->job->getJobId(), $job->job)); |
| 32 | 32 | }); |
@@ -47,12 +47,12 @@ discard block |
||
| 47 | 47 | /** |
| 48 | 48 | * publish migrations |
| 49 | 49 | */ |
| 50 | - $this->publishes([__DIR__ . '/../database/migrations' => database_path('migrations')], 'migrations'); |
|
| 50 | + $this->publishes([__DIR__.'/../database/migrations' => database_path('migrations')], 'migrations'); |
|
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | 53 | * Register Facade |
| 54 | 54 | */ |
| 55 | - $this->app->bind('Qwatch', function () { |
|
| 55 | + $this->app->bind('Qwatch', function() { |
|
| 56 | 56 | return (new Qwatcher); |
| 57 | 57 | }); |
| 58 | 58 | |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Illuminate\Queue\Queue; |
| 4 | 4 | use Carbon\Carbon; |
| 5 | -use Maqe\Qwatcher\Tracks\Enums\StatusType; |
|
| 6 | 5 | |
| 7 | 6 | abstract class TracksAbstract extends Queue |
| 8 | 7 | { |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Maqe\Qwatcher\Traits; |
| 4 | 4 | |
| 5 | -use DB; |
|
| 6 | 5 | use Illuminate\Contracts\Bus\Dispatcher; |
| 7 | 6 | |
| 8 | 7 | trait WatchableDispatchesJobs |
@@ -1,8 +1,6 @@ |
||
| 1 | 1 | <?php namespace Maqe\Qwatcher; |
| 2 | 2 | |
| 3 | 3 | use Illuminate\Database\Eloquent\Builder; |
| 4 | -use Illuminate\Database\Eloquent\Collection; |
|
| 5 | -use Illuminate\Pagination\LengthAwarePaginator; |
|
| 6 | 4 | use Maqe\Qwatcher\Tracks\Enums\StatusType; |
| 7 | 5 | use Maqe\Qwatcher\Tracks\TracksInterface; |
| 8 | 6 | use Maqe\Qwatcher\Tracks\Tracks; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | */ |
| 123 | 123 | public function getByStatus($status, $per_page = null) |
| 124 | 124 | { |
| 125 | - if(!in_array($status, $this->statusable)) { |
|
| 125 | + if (!in_array($status, $this->statusable)) { |
|
| 126 | 126 | throw new \InvalidArgumentException('"'.$status.'" is not allowed in status type'); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | */ |
| 153 | 153 | public function getByJobName($name, $per_page = null) |
| 154 | 154 | { |
| 155 | - $collecName = strtolower(str_replace('_', '%',$name)); |
|
| 155 | + $collecName = strtolower(str_replace('_', '%', $name)); |
|
| 156 | 156 | $condition = "`tracks`.`job_name` LIKE '%{$collecName}%'"; |
| 157 | 157 | $builder = Tracks::whereRaw($condition); |
| 158 | 158 | |
@@ -2,7 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | use App\Http\Controllers\Controller; |
| 4 | 4 | use Illuminate\Http\Request; |
| 5 | -use Maqe\Qwatcher\Tracks\Tracks; |
|
| 6 | 5 | use Qwatcher; |
| 7 | 6 | |
| 8 | 7 | class TracksController extends Controller |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function transforms(Collection $tracks) |
| 33 | 33 | { |
| 34 | - return $tracks->each(function ($track) { |
|
| 34 | + return $tracks->each(function($track) { |
|
| 35 | 35 | $track = $this->transform($track); |
| 36 | 36 | }); |
| 37 | 37 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('tracks', function (Blueprint $table) { |
|
| 16 | + Schema::create('tracks', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->string('driver'); |
| 19 | 19 | $table->integer('queue_id'); |