diff --git a/app/Http/Controllers/Training/SessionsController.php b/app/Http/Controllers/Training/SessionsController.php index a4f7fb11..d74e3f76 100644 --- a/app/Http/Controllers/Training/SessionsController.php +++ b/app/Http/Controllers/Training/SessionsController.php @@ -237,9 +237,8 @@ public function cancelTrainingSession(Request $request, $session_id) //Discord Notification in Training Thread $discord = new DiscordClient(); - $discord->sendMessage($session->student->user->id, '<@'.$session->student->user->discord_user_id.'>'); $discord->sendEmbedInTrainingThread($session->student->user->id, 'Training Session Cancelled', -'A training session which was planned has been cancelled. +'A training session which was planned has just been cancelled. Please contact your instructor if you believe this was a mistake, or to reorganise a new session.'); diff --git a/app/Jobs/DiscordAccountCheck.php b/app/Jobs/DiscordAccountCheck.php index 41496b1f..ca6561e9 100644 --- a/app/Jobs/DiscordAccountCheck.php +++ b/app/Jobs/DiscordAccountCheck.php @@ -47,6 +47,7 @@ public function handle() $user_updated = 0; $discord_uids = []; $discord_member_contents = []; + $in_discord_name = []; // Get List of Users in Discord $discord = new DiscordClient(); diff --git a/app/Jobs/ProcessShanwickControllers.php b/app/Jobs/ProcessShanwickControllers.php index 924f9bc5..d6a09b3d 100644 --- a/app/Jobs/ProcessShanwickControllers.php +++ b/app/Jobs/ProcessShanwickControllers.php @@ -19,7 +19,7 @@ class ProcessShanwickControllers implements ShouldQueue { use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; - public $timeout = 600; + public $timeout = 1200; /** * Create a new job instance. @@ -39,7 +39,7 @@ public function __construct() public function handle() { // Data to Start Off With - ini_set('max_execution_time', 600); + ini_set('max_execution_time', 1200); // VATSIM Region List $vatsim_regions = [ diff --git a/routes/web.php b/routes/web.php index abc71b8a..d7b60b85 100644 --- a/routes/web.php +++ b/routes/web.php @@ -38,6 +38,7 @@ use App\Http\Controllers\TrainingCalendar\TrainingController; use App\Http\Controllers\Training\SoloCertificationsController; use App\Http\Controllers\DiscordTestController; +use App\Jobs\ProcessShanwickControllers; Route::get('/', [PrimaryViewsController::class, 'home'])->name('index'); Route::get('/map', [PrimaryViewsController::class, 'map'])->name('map'); @@ -57,6 +58,10 @@ Route::get('/events/{slug}', [EventController::class, 'viewEvent'])->name('events.view'); Route::view('/branding', 'about.branding')->name('branding'); +Route::get('/roster/update/controller-details', function () { + ProcessShanwickControllers::dispatch(); +}); + // About Route::prefix('about')->group(function () { Route::get('/', fn() => redirect(route('about.who-we-are'), 301))->name('about.index');