29 lines
627 B
PHP
29 lines
627 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace Modules\Core\MigrateImport;
|
||
|
|
|
||
|
|
use Illuminate\Bus\Queueable;
|
||
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||
|
|
use Illuminate\Foundation\Bus\Dispatchable;
|
||
|
|
use Illuminate\Queue\InteractsWithQueue;
|
||
|
|
use Illuminate\Queue\SerializesModels;
|
||
|
|
|
||
|
|
class RunMigrateImportJob implements ShouldQueue
|
||
|
|
{
|
||
|
|
use Dispatchable;
|
||
|
|
use InteractsWithQueue;
|
||
|
|
use Queueable;
|
||
|
|
use SerializesModels;
|
||
|
|
|
||
|
|
public function __construct(
|
||
|
|
public readonly ImportSpec $spec,
|
||
|
|
) {
|
||
|
|
}
|
||
|
|
|
||
|
|
public function handle(): void
|
||
|
|
{
|
||
|
|
$importer = ImporterFactory::make($this->spec);
|
||
|
|
$importer->import($this->spec);
|
||
|
|
}
|
||
|
|
}
|