clone saver framework and code cleanup

This commit is contained in:
2019-01-19 04:30:08 -06:00
parent 69f60b45ce
commit ddcb121b48
11 changed files with 36 additions and 203 deletions
+1 -12
View File
@@ -83,17 +83,6 @@ class CalculateMarketTax extends Command
$character = UserToCorporation::where(['character_id' => $info->character_id])->first();
//Store the value in the database
$bill = new MonthlyMarketTax;
$bill->character_id = $info->character_id;
$bill->character_name = $character->character_name;
$bill->corporation_id = $corp->corporation_id;
$bill->corporation_name = $character->corporation_name;
$bill->tax_owed = $finalTaxes;
$bill->month = $start->month;
$bill->year = $start->year;
$bill->save();
$mail = new EveMail;
$mail->sender = 93738489;
$mail->subject = 'Market Taxes Owed';
@@ -107,7 +96,7 @@ class CalculateMarketTax extends Command
$mail->recipient_type = 'character';
//$mail->save();
SendEveMail::dispatch($mail);
SendEveMail::dispatch($mail)->delay(Carbon::now()->addSeconds(15));
}
@@ -1,61 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
use Commands\Library\CommandHelper;
use App\Models\Logistics\Contract;
use App\Models\ScheduledTask\ScheduleJob;
use Seat\Eseye\Cache\NullCache;
use Seat\Eseye\Configuration;
use Seat\Eseye\Containers\EsiAuthentication;
use Seat\Eseye\Eseye;
class GetLogisticsContracts extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'services:logistics';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Get the logistics jobs.';
/**
* 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('CorpJournal');
//Add the entry into the jobs table saying the job is starting
$task->SetStartStatus();
//Create functionality to record contracts for logistical services
//Mark the job as finished
$task->SetStopStatus();
}
}
+5 -5
View File
@@ -13,7 +13,7 @@ use App\Library\Clones\CloneSaver;
use App\Models\Character\CharacterClone;
class runclonesaver extends Command
class RunCloneSaver extends Command
{
/**
* The name and signature of the console command.
@@ -60,6 +60,9 @@ class runclonesaver extends Command
}
private function CloneSaverMail() {
//Setup time frame job has been sent so we don't send too many mails
//Store a new eve mail model for the job to dispatch
$mail = new EveMail;
$mail->sender = $self;
@@ -69,9 +72,6 @@ class runclonesaver extends Command
$mail->recipient_type = 'character';
//Dispatch the job
SendEveMail::dispatch($mail);
//Setup time frame job has been sent so we don't send too many mails all at once
SendEveMail::dispatch($mail)->delay(Carbon::now()->addSeconds(1));
}
}
+4 -1
View File
@@ -19,8 +19,8 @@ class Kernel extends ConsoleKernel
Commands\UpdateMoonPricing::class,
Commands\DumpFleets::class,
Commands\CalculateMarketTax::class,
//Commands\GetLogisticsContracts::class,
Commands\holdingfinances::class,
Commands\RunCloneSaver::class,
];
/**
@@ -49,6 +49,9 @@ class Kernel extends ConsoleKernel
$schedule->command('services:holdingjournal')
->hourly()
->withoutOverlapping();
//$schedule->command('services:clonesaver')
// ->everyMinute()
// ->withoutOverlapping();
}
/**