Support processing nodelists from file repository and assume nodelists are zip fiels
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
||||
use Illuminate\Console\Command;
|
||||
|
||||
use App\Jobs\NodelistImport as Job;
|
||||
use App\Models\File;
|
||||
|
||||
class NodelistImport extends Command
|
||||
{
|
||||
@@ -14,7 +15,7 @@ class NodelistImport extends Command
|
||||
* @var string
|
||||
*/
|
||||
protected $signature = 'nodelist:import'
|
||||
.' {file : Nodelist File}'
|
||||
.' {file : File ID}'
|
||||
.' {--D|delete : Delete old data for the date}'
|
||||
.' {--U|unlink : Delete file after import}';
|
||||
|
||||
@@ -32,6 +33,6 @@ class NodelistImport extends Command
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
return Job::dispatchSync($this->argument('file'),$this->option('delete'),$this->option('unlink'));
|
||||
return Job::dispatchSync(File::findOrFail($this->argument('file')),$this->option('delete'),$this->option('unlink'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user