File tree 1 file changed +12
-1
lines changed
src/Illuminate/Foundation/Console
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,25 @@ public function __construct(Application $app, Dispatcher $events)
99
99
protected function defineConsoleSchedule ()
100
100
{
101
101
$ this ->app ->singleton (Schedule::class, function ($ app ) {
102
- return new Schedule ($ this ->scheduleTimezone ());
102
+ return (new Schedule ($ this ->scheduleTimezone ()))
103
+ ->useCache ($ this ->scheduleCache ());
103
104
});
104
105
105
106
$ schedule = $ this ->app ->make (Schedule::class);
106
107
107
108
$ this ->schedule ($ schedule );
108
109
}
109
110
111
+ /**
112
+ * Get the name of the cache store that should manage scheduling mutexes.
113
+ *
114
+ * @return string
115
+ */
116
+ protected function scheduleCache ()
117
+ {
118
+ return $ _ENV ['SCHEDULE_CACHE_DRIVER ' ] ?? null ;
119
+ }
120
+
110
121
/**
111
122
* Run the console application.
112
123
*
You can’t perform that action at this time.
0 commit comments