Skip to content

Commit

Permalink
Merge pull request #418 from czqoocavatsim/JoshuaBranch
Browse files Browse the repository at this point in the history
Update ProcessRosterInactivity.php
  • Loading branch information
JoshuaMicallefYBSU authored Dec 1, 2024
2 parents 7104439 + d206ded commit 7b16990
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions app/Jobs/ProcessRosterInactivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
use App\Services\DiscordClient;

class ProcessRosterInactivity implements ShouldQueue

{
use Dispatchable;
use InteractsWithQueue;
use Queueable;
use SerializesModels;

public $timeout = 600;

/**
* Create a new job instance.
*
Expand All @@ -40,6 +43,9 @@ public function __construct()
*/
public function handle()
{
// Timeout length (seconds)
ini_set('max_execution_time', 600);

// Counter Variables (For Message at End)
$first_notice = 0; //1NOV message sent out
$second_notice = 0; //1DEC message sent out
Expand Down Expand Up @@ -88,21 +94,19 @@ public function handle()
$active_status = 1;
}

dd(Carbon::now()->format('d/m'));

// 1NOV - 2 Month Activity Check
if($roster->certification == "certified" && $roster->active && Carbon::now()->format('d/m') == "1/11" && $roster->currency < 1) {
if($roster->certification == "certified" && $roster->active && Carbon::now()->format('d/m') == "01/12" && $roster->currency < 1) {
$active_status = 0;

$first_names[] = $name;

$first_notice++;

Notification::send($roster->user, new TwoMonthFromRemoval($roster->user, $currency));
// Notification::send($roster->user, new TwoMonthFromRemoval($roster->user, $currency));
}

// 1DEC - 1 Month till Removal
if($roster->certification == "certified" && Carbon::now()->format('d/m') == "1/12" && $roster->currency < 1){
if($roster->certification == "certified" && Carbon::now()->format('d/m') == "02/12" && $roster->currency < 1){
$active_status = 0;

$second_names[] = $name;
Expand Down

0 comments on commit 7b16990

Please sign in to comment.