Rework nodelist import and ignoring addresses that we manage

This commit is contained in:
2023-10-04 23:42:58 +11:00
parent b854cf9fe0
commit 32c0088339
2 changed files with 83 additions and 39 deletions

View File

@@ -36,13 +36,20 @@ class NodelistImport extends Command
*/
public function handle()
{
return Job::dispatchSync(
is_numeric($x=$this->argument('file')) ? File::findOrFail($x) : $x,
$this->argument('domain'),
$this->option('delete'),
$this->option('unlink'),
$this->option('test'),
$this->option('ignorecrc'),
);
try {
return Job::dispatchSync(
is_numeric($x=$this->argument('file'))
? File::findOrFail($x)
: sprintf('%s/%s',config('fido.dir'),$this->argument('file')),
$this->argument('domain'),
$this->option('delete'),
$this->option('unlink'),
$this->option('test'),
$this->option('ignorecrc'),
);
} catch (\Exception $e) {
$this->error($e->getMessage());
}
}
}