Skip to content

Commit

Permalink
Merge pull request #358 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Update DiscordAccountCheck
  • Loading branch information
JoshuaMicallefYBSU authored Oct 20, 2024
2 parents f99e5af + 1a5cc1f commit ffad7a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Console/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function schedule(Schedule $schedule)
$schedule->job(new ProcessSessionLogging())->everyMinute();

//Inactivity checks
$schedule->job(new DiscordAccountCheck())->dailyAt('5:40');
$schedule->job(new DiscordAccountCheck())->dailyAt('6:15');

//Inactivity checks
$schedule->job(new ProcessRosterInactivity())->daily();
Expand Down
8 changes: 7 additions & 1 deletion app/Jobs/DiscordAccountCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class DiscordAccountCheck implements ShouldQueue
public function handle()
{
// Timeout length (seconds)
ini_set('max_execution_time', 1200);
ini_set('max_execution_time', 2000);

// Script Start Time
$start_time = Carbon::now();
Expand Down Expand Up @@ -132,6 +132,12 @@ public function handle()
}
}

// Shankwick Roster Members
$shanwickRoster = ShanwickRoster::where('controller_cid', $user->id)->first();
if ($shanwickRoster) {
array_push($rolesToAdd, $discordRoleIds['certified']);
}

//Supervisor?
if ($user->rating_short == 'SUP') {
array_push($rolesToAdd, $discordRoleIds['supervisor']);
Expand Down

0 comments on commit ffad7a7

Please sign in to comment.