Update nodelist parsing now that we have mailer_system

This commit is contained in:
2023-07-09 22:03:15 +10:00
parent d4439a6b58
commit 52055c5217
4 changed files with 173 additions and 60 deletions

View File

@@ -15,7 +15,7 @@ class NodelistImport extends Command
* @var string
*/
protected $signature = 'nodelist:import'
.' {file : File ID}'
.' {file : File ID | filename}'
.' {domain? : Domain Name}'
.' {--D|delete : Delete old data for the date}'
.' {--U|unlink : Delete file after import}';
@@ -34,6 +34,11 @@ class NodelistImport extends Command
*/
public function handle()
{
return Job::dispatchSync(File::findOrFail($this->argument('file')),$this->argument('domain'),$this->option('delete'),$this->option('unlink'));
return Job::dispatchSync(
is_numeric($x=$this->argument('file')) ? File::findOrFail($x) : $x,
$this->argument('domain'),
$this->option('delete'),
$this->option('unlink')
);
}
}