miscellaneous modifications

This commit is contained in:
2020-03-03 23:35:52 -06:00
parent 6ffcb83e1e
commit 358a99a8fb
40 changed files with 157 additions and 102 deletions
+3 -2
View File
@@ -4,7 +4,6 @@ namespace App\Console\Commands;
//Internal Library
use Illuminate\Console\Command;
use DB;
use Commands\Library\CommandHelper;
//Models
@@ -67,7 +66,9 @@ class GetCorpsCommand extends Command
dd($e->getEsiResponse());
}
//Delete all of the entries in the AllianceCorps table
DB::table('AllianceCorps')->delete();
AllianceCorp::truncate();
//Foreach corporation, make entries into the database.
foreach($corporations as $corp) {
try {
$corpInfo = $esi->invoke('get', '/corporations/{corporation_id}/', [
@@ -5,7 +5,6 @@ namespace App\Console\Commands;
//Internal Library
use Illuminate\Console\Command;
use Carbon\Carbon;
use DB;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
@@ -3,7 +3,6 @@
namespace Commands\Library;
//Internal Libraries
use DB;
use Carbon\Carbon;
//Models
@@ -32,7 +31,7 @@ class CommandHelper {
public function SetStopStatus() {
//Mark the job as finished
DB::table('schedule_jobs')->where([
ScheduleJob::where([
'system_time' => $this->system_time,
'job_name' => $this->job_name,
])->update([
@@ -41,7 +40,8 @@ class CommandHelper {
}
public function CleanJobStatusTable() {
DB::table('schedule_jobs')->where('system_time', '<', Carbon::now()->subMonths(3))->delete();
//Delete old jobs
ScheduleJob::where(['system_time', '<', Carbon::now()->subMonths(3)])->delete();
}
}
@@ -4,7 +4,6 @@ namespace App\Console\Commands;
use Illuminate\Console\Command;
use Carbon\Carbon;
use DB;
//Jobs
use App\Jobs\ProcessSendEveMailJob;
@@ -3,7 +3,6 @@
namespace App\Console\Commands;
use Illuminate\Console\Command;
use DB;
use Carbon\Carbon;
use Commands\Library\CommandHelper;
@@ -176,6 +176,14 @@ class PurgeUsers extends Command
User::where([
'character_id' => $user->character_id,
])->delete();
EsiScope::where([
'character_id' => $user->character_id,
])->delete();
EsiToken::where([
'character_id' => $user->character_id,
])->delete();
}
}
}