Add to clear-caches-all command to show output when exec restart supervisor

This commit is contained in:
Afiq Hamzah
2024-08-10 07:20:57 +08:00
parent f4fe3c9184
commit d2d6c0aa47
+7
View File
@@ -77,6 +77,13 @@ class ClearCachesAll extends Command
$output = [];
$returnVar = null;
exec('php artisan supervisor:restart 2>&1', $output, $returnVar);
// output result of command RestartSupervisor
if ($returnVar === 0) {
$this->info("Restart Supervisor ran successfully:\n" . implode("\n", $output));
} else {
$this->error("Restart Supervisor failed:\n" . implode("\n", $output));
}
$this->info("All caches have been cleared.");
}