Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 3 |
| DockerDedup | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
| handle | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
| 1 | <?php |
| 2 | |
| 3 | namespace Qmp\Laravel\Deduplication\Console\Commands; |
| 4 | |
| 5 | use Illuminate\Console\Command; |
| 6 | use Qmp\Laravel\Deduplication\Objects\DedupRunner; |
| 7 | use Qmp\Laravel\DeduplicationQueue\Jobs\Deduplication; |
| 8 | |
| 9 | class DockerDedup extends Command |
| 10 | { |
| 11 | /** |
| 12 | * The name and signature of the console command. |
| 13 | * |
| 14 | * @var string |
| 15 | */ |
| 16 | protected $signature = 'docker:dedup {session_id}'; |
| 17 | /** |
| 18 | * The console command description. |
| 19 | * |
| 20 | * @var string |
| 21 | */ |
| 22 | protected $description = 'Create docker container and run dedup command'; |
| 23 | |
| 24 | |
| 25 | /** |
| 26 | * Execute the console command. |
| 27 | * |
| 28 | * @return void |
| 29 | */ |
| 30 | public function handle() : void |
| 31 | { |
| 32 | $runner = new DedupRunner($this->argument('session_id')); |
| 33 | Deduplication::dispatch($runner); |
| 34 | } |
| 35 | } |