We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 152e9c5 commit 7364611Copy full SHA for 7364611
app/Console/Commands/SystemMaintenance.php
@@ -4,6 +4,7 @@
4
5
use Illuminate\Console\Command;
6
use Illuminate\Support\Facades\Artisan;
7
+use Illuminate\Support\Facades\Log;
8
9
class SystemMaintenance extends Command
10
{
@@ -36,8 +37,20 @@ public function handle()
36
37
*/
38
protected function refreshCache(): void
39
- Artisan::call('optimize:clear');
40
+ try {
41
+ Artisan::call('optimize:clear');
42
+ } catch (\Throwable $th) {
43
+ Log::info('System maintenance failed to clear the cache.');
44
- Artisan::call('optimize');
45
+ return;
46
+ }
47
+
48
49
+ Artisan::call('optimize');
50
51
+ Log::info('System maintenance failed to fresh the cache.');
52
53
54
55
}
56
0 commit comments