Enable comm:* commands to be run interactively
This commit is contained in:
parent
03c6cadbf9
commit
4bbb82690c
@ -16,7 +16,9 @@ class CommBinkpSend extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'comm:binkp:send {ftn : FTN to Send to}';
|
protected $signature = 'comm:binkp:send'
|
||||||
|
.'{--N|now : Dont queue}'
|
||||||
|
.'{ftn : FTN to Send to}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
@ -32,7 +34,7 @@ class CommBinkpSend extends Command
|
|||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle(): void
|
public function handle()
|
||||||
{
|
{
|
||||||
$ao = Address::findFTN($this->argument('ftn'));
|
$ao = Address::findFTN($this->argument('ftn'));
|
||||||
if (! $ao)
|
if (! $ao)
|
||||||
@ -42,6 +44,6 @@ class CommBinkpSend extends Command
|
|||||||
|
|
||||||
$mo = Mailer::where('name',self::ID)->singleOrFail();
|
$mo = Mailer::where('name',self::ID)->singleOrFail();
|
||||||
|
|
||||||
Job::dispatch($ao,$mo);
|
return ($this->option('now')) ? Job::dispatchSync($ao,$mo) : Job::dispatch($ao,$mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,9 @@ class CommEMSISend extends Command
|
|||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $signature = 'comm:emsi:send {ftn : FTN to Send to}';
|
protected $signature = 'comm:emsi:send'
|
||||||
|
.'{--N|now : Dont queue}'
|
||||||
|
.'{ftn : FTN to Send to}';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The console command description.
|
* The console command description.
|
||||||
@ -32,7 +34,7 @@ class CommEMSISend extends Command
|
|||||||
*
|
*
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function handle(): void
|
public function handle()
|
||||||
{
|
{
|
||||||
$ao = Address::findFTN($this->argument('ftn'));
|
$ao = Address::findFTN($this->argument('ftn'));
|
||||||
if (! $ao)
|
if (! $ao)
|
||||||
@ -42,6 +44,6 @@ class CommEMSISend extends Command
|
|||||||
|
|
||||||
$mo = Mailer::where('name',self::ID)->singleOrFail();
|
$mo = Mailer::where('name',self::ID)->singleOrFail();
|
||||||
|
|
||||||
Job::dispatch($ao,$mo);
|
return ($this->option('now')) ? Job::dispatchSync($ao,$mo) : Job::dispatch($ao,$mo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user