Skip to content

Commit

Permalink
Merge pull request #415 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Update Code
  • Loading branch information
JoshuaMicallefYBSU authored Nov 30, 2024
2 parents 3662777 + e63e3a9 commit 3b22b0b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/Http/Controllers/Training/SessionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.');

Expand Down
1 change: 1 addition & 0 deletions app/Jobs/DiscordAccountCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions app/Jobs/ProcessShanwickControllers.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ProcessShanwickControllers implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

public $timeout = 600;
public $timeout = 1200;

/**
* Create a new job instance.
Expand All @@ -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 = [
Expand Down
5 changes: 5 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down

0 comments on commit 3b22b0b

Please sign in to comment.