updated hardcoded character with env variable
This commit is contained in:
@@ -59,21 +59,23 @@ class GetAssetsCommand extends Command
|
||||
//Add the entry into the jobs table saying the job is starting
|
||||
$task->SetStartStatus();
|
||||
|
||||
//Setup the esi authentication container
|
||||
$config = config('esi');
|
||||
|
||||
//Declare some variables
|
||||
$charId = 93738849;
|
||||
$corpId = 98287666;
|
||||
|
||||
//ESI Scope Check
|
||||
$esiHelper = new Esi();
|
||||
$assetScope = $esiHelper->HaveEsiScope(93738489, 'esi-assets.read_corporation_assets.v1');
|
||||
$assetScope = $esiHelper->HaveEsiScope($config['primary'], 'esi-assets.read_corporation_assets.v1');
|
||||
|
||||
if($assetScope == false) {
|
||||
Log::critical("Scope check for esi failed.");
|
||||
return null;
|
||||
}
|
||||
|
||||
//Setup the esi authentication container
|
||||
$config = config('esi');
|
||||
|
||||
//Get the refresh token from the database
|
||||
$token = EsiToken::where(['character_id' => $charId])->get(['refresh_token']);
|
||||
$authentication = new EsiAuthentication([
|
||||
|
||||
@@ -56,14 +56,17 @@ class HoldingFinancesCommand extends Command
|
||||
//Setup the Finances container
|
||||
$finance = new FinanceHelper();
|
||||
|
||||
//Get the esi configuration
|
||||
$config = config('esi');
|
||||
|
||||
//Get the total pages for the journal for the holding corporation
|
||||
$pages = $finance->GetJournalPageCount(1, 93738489);
|
||||
$pages = $finance->GetJournalPageCount(1, $config['primary']);
|
||||
|
||||
//Dispatch a single job for each page to process
|
||||
for($i = 1; $i <= $pages; $i++) {
|
||||
$job = new JobProcessWalletJournal;
|
||||
$job->division = 1;
|
||||
$job->charId = 93738489;
|
||||
$job->charId = $config['primary'];
|
||||
$job->page = $i;
|
||||
ProcessWalletJournalJob::dispatch($job)->onQueue('journal');
|
||||
}
|
||||
|
||||
@@ -72,6 +72,9 @@ class MoonMailerCommand extends Command
|
||||
$today->minute = 0;
|
||||
$today->hour = 0;
|
||||
|
||||
//Get the esi configuration
|
||||
$config = config('esi');
|
||||
|
||||
//Get all contacts from the rentals group
|
||||
$contacts = MoonRental::select('Contact')->groupBy('Contact')->get();
|
||||
|
||||
@@ -99,7 +102,7 @@ class MoonMailerCommand extends Command
|
||||
|
||||
//Dispatch the mail job
|
||||
$mail = new EveMail;
|
||||
$mail->sender = 93738489;
|
||||
$mail->sender = $config['primary'];
|
||||
$mail->subject = "Warped Intentions Moon Rental Payment Due";
|
||||
$mail->body = $body;
|
||||
$mail->recipient = (int)$contact->Contact;
|
||||
|
||||
@@ -60,8 +60,11 @@ class GetStructuresCommand extends Command
|
||||
//Add the entry into the jobs table saying the job is starting
|
||||
$task->SetStartStatus();
|
||||
|
||||
//Get the esi config
|
||||
$config = config('esi');
|
||||
|
||||
//Declare some variables
|
||||
$charId = 93738489;
|
||||
$charId = $config['primary'];
|
||||
$corpId = 98287666;
|
||||
$sHelper = new StructureHelper($charId, $corpId);
|
||||
$structures = null;
|
||||
|
||||
Reference in New Issue
Block a user