pi transactions as its own command

This commit is contained in:
2019-04-19 23:04:59 -05:00
parent a283f890f3
commit 74f7e5b882
3 changed files with 113 additions and 45 deletions
+56
View File
@@ -0,0 +1,56 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Commands\Library\CommandHelper;
use App\Library\Finances\Helper\FinanceHelper;
class PiTransactionsCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:PiTransactions';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the transactions from the market alt for the alliance';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
//Create the command helper container
$task = new CommandHelper('PiTransactions');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Setup the Finances container
$finance = new FinanceHelper();
$finance->GetWalletTransaction(3, 94415555);
//Mark the job as finished
$task->SetStopStatus();
}
}
+4
View File
@@ -19,6 +19,7 @@ class Kernel extends ConsoleKernel
Commands\CalculateMarketTaxCommand::class,
Commands\HoldingFinancesCommand::class,
Commands\MoonMailerCommand::class,
Commands\PiTransactionsCommand::class,
];
/**
@@ -47,6 +48,9 @@ class Kernel extends ConsoleKernel
$schedule->command('services:MoonMailer')
->monthlyOn(1, '00:01')
->withoutOverlapping();
$schedule->command('services:PiTransactions')
->hourly()
->withoutOverlapping();
}
/**