Add domain to TIC processing, for nodelists that dont have a domain
This commit is contained in:
@@ -12,6 +12,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Classes\FTN\Tic;
|
||||
use App\Models\Domain;
|
||||
|
||||
class TicProcess implements ShouldQueue
|
||||
{
|
||||
@@ -19,13 +20,17 @@ class TicProcess implements ShouldQueue
|
||||
|
||||
private const LOGKEY = 'JTP';
|
||||
|
||||
private ?Domain $do;
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @param string $file
|
||||
* @param string|null $domain
|
||||
*/
|
||||
public function __construct(private string $file)
|
||||
public function __construct(private string $file,private ?string $domain=NULL)
|
||||
{
|
||||
$this->do = $domain ? Domain::where('name',$domain)->singleOrFail() : NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,6 +48,6 @@ class TicProcess implements ShouldQueue
|
||||
unlink($this->file);
|
||||
|
||||
if ($to->isNodelist())
|
||||
NodelistImport::dispatch($to->fo);
|
||||
NodelistImport::dispatch($to->fo,$this->domain);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user