added commands for jobs

This commit is contained in:
2021-04-19 18:53:32 +09:00
parent 54b25480e2
commit 0b65005f9d
4 changed files with 141 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands\MiningTaxes;
use Illuminate\Console\Command;
use App\Jobs\Commands\MiningTaxes\FetchMiningTaxesObservers;
class ExecuteMinigTaxesObserversCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'miningtax:observer';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Dispatch a mining tax observer job.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
FetchMiningTaxesObservers::dispatch();
return 0;
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Jobs\Commands\MiningTaxes\PreFetchMiningTaxesLedgers;
class ExecuteMiningTaxesLedgersCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'miningtax:ledgers';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Execute mining taxes ledgers jobs.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
PreFetchMiningTaxesLedgers::dispatch();
return 0;
}
}

View File

@@ -0,0 +1,46 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Jobs\Commands\MiningTaxes\SendMiningTaxesInvoices;
class ExecuteSendMiningTaxesInvoiceCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'miningtax:send';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Execute send mining tax invoices.';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
SendMiningTaxesInvoices::dispatch();
return 0;
}
}

View File

@@ -29,6 +29,9 @@ class Kernel extends ConsoleKernel
Commands\Data\Test::class,
Commands\Eve\ItemPricesUpdateCommand::class,
Commands\Finances\UpdateAllianceWalletJournal::class,
Commands\MiningTaxes\ExecuteMiningTaxesObserversCommand::class,
Commands\MiningTaxes\ExecuteMiningTaxesLedgersCommand::class,
Commands\MiningTaxes\ExecuteSendMiningTaxesInvoiceCommand::class,
];
/**