-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dispatch event when a scheduled command was filtered from running (#3…
…0407) If a scheduled command is run with a truth constraint, it is not simple to check whether the task didn't run at all, or if it was filtered running from a known system constraint. Firing an event when the task is intentionally skipped allows monitoring over the task executing as scheduled, based on the truth constraint.
- Loading branch information
1 parent
e3880cf
commit f4985df
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
namespace Illuminate\Console\Events; | ||
|
||
use Illuminate\Console\Scheduling\Event; | ||
|
||
class ScheduledTaskSkipped | ||
{ | ||
/** | ||
* The scheduled event being run. | ||
* | ||
* @var \Illuminate\Console\Scheduling\Event | ||
*/ | ||
public $task; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param \Illuminate\Console\Scheduling\Event $task | ||
* @return void | ||
*/ | ||
public function __construct(Event $task) | ||
{ | ||
$this->task = $task; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters