Skip to content

Commit e5bb9b8

Browse files
authored
Merge pull request #112 from faustbrian/main
Make `graceTimeInMinutes` configurable
2 parents d7d6bce + afb1599 commit e5bb9b8

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

config/schedule-monitor.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@
7676
*/
7777
'send_starting_ping' => env('OH_DEAR_SEND_STARTING_PING', false),
7878

79-
79+
/**
80+
* The amount of minutes a scheduled task is allowed to run before it is
81+
* considered late.
82+
*/
83+
'grace_time_in_minutes' => 5,
8084
],
8185
];

src/Support/ScheduledTasks/Tasks/Task.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function lastRunFailed(): bool
163163

164164
public function graceTimeInMinutes()
165165
{
166-
return $this->event->graceTimeInMinutes ?? 5;
166+
return $this->event->graceTimeInMinutes ?? config('schedule-monitor.oh_dear.grace_time_in_minutes', 5);
167167
}
168168

169169
public function cronExpression(): string

0 commit comments

Comments
 (0)