Skip to content
This repository was archived by the owner on Sep 22, 2024. It is now read-only.

Commit 422ed8d

Browse files
committed
Remove production check. It should be handled on the scheduler
1 parent fbdfbb9 commit 422ed8d

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/Commands/stubs/task.stub

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ use Illuminate\Console\Scheduling\Schedule;
77

88
class DummyClass implements TaskContract
99
{
10-
/**
11-
* Determine if the task should only run in production.
12-
*
13-
* @var bool
14-
*/
15-
public $onlyInProduction = false;
16-
1710
public function __invoke(Schedule $schedule)
1811
{
1912
//

src/TaskLoader.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ public function loadFor(Schedule $schedule, array $exclude = [])
4242
! (new ReflectionClass($taskClass))->isAbstract()) {
4343
$task = new $taskClass;
4444

45-
// If the task should only run in production
46-
// and the application is not in production
47-
// then return
48-
if (isset($task->onlyInProduction)
49-
&& $task->onlyInProduction === true
50-
&& ! $this->app->environment('production')
51-
) {
52-
continue;
53-
}
54-
5545
// Invoke task
5646
$task($schedule);
5747
}

0 commit comments

Comments
 (0)