schedule testing

This commit is contained in:
2018-11-26 08:24:47 -06:00
parent 390fb59fa3
commit 115b6353a3
4 changed files with 46 additions and 9 deletions
+11 -1
View File
@@ -58,12 +58,22 @@ class CorpJournal extends Command
$job->save();
//Setup the Finances Container
$finance = new Finances();
//Setup an array to store corporations which have been logged so we don't keep calling the same ones. We need
//this step in order to save time during the cronjob.
$finishedCorps = array();
//Get the corps with structures logged in the database
$structures = DB::table('CorpStructures')->get();
//For each structure get the corp journals from the corporation owning the structure
//After getting the corp journal for the corporation, let's not do the corporation again
foreach($structures as $structure) {
$this->line('Getting corp journal');
foreach($finishedCorps as $finished) {
if($finished == $structure->corporation_id) {
break;
}
}
//$this->line('Getting corp journal');
$this->GetJournal($structure->character_id);
$finishedCorps[sizeof($finishedCorps)] = $structure->corporation_id;
}
//Mark the job as finished