Skip to content

Commit 7b16990

Browse files
Merge pull request #418 from czqoocavatsim/JoshuaBranch
Update ProcessRosterInactivity.php
2 parents 7104439 + d206ded commit 7b16990

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

app/Jobs/ProcessRosterInactivity.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@
1717
use App\Services\DiscordClient;
1818

1919
class ProcessRosterInactivity implements ShouldQueue
20+
2021
{
2122
use Dispatchable;
2223
use InteractsWithQueue;
2324
use Queueable;
2425
use SerializesModels;
2526

27+
public $timeout = 600;
28+
2629
/**
2730
* Create a new job instance.
2831
*
@@ -40,6 +43,9 @@ public function __construct()
4043
*/
4144
public function handle()
4245
{
46+
// Timeout length (seconds)
47+
ini_set('max_execution_time', 600);
48+
4349
// Counter Variables (For Message at End)
4450
$first_notice = 0; //1NOV message sent out
4551
$second_notice = 0; //1DEC message sent out
@@ -88,21 +94,19 @@ public function handle()
8894
$active_status = 1;
8995
}
9096

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

97101
$first_names[] = $name;
98102

99103
$first_notice++;
100104

101-
Notification::send($roster->user, new TwoMonthFromRemoval($roster->user, $currency));
105+
// Notification::send($roster->user, new TwoMonthFromRemoval($roster->user, $currency));
102106
}
103107

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

108112
$second_names[] = $name;

0 commit comments

Comments
 (0)