Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions app/Console/Commands/SystemMaintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,23 @@ class SystemMaintenance extends Command
* Execute the console command.
*/
public function handle()
{
$this->refreshCache();

return Command::SUCCESS;
}

/**
* Clear and refresh the cache.
*/
protected function refreshCache(): void
{
try {
Artisan::call('optimize:clear');
Artisan::call('cache:clear');
} catch (\Throwable $th) {
Log::info('System maintenance failed to clear the cache.');

return;
return Command::FAILURE;
}

try {
Artisan::call('optimize');
Artisan::call('view:clear');
} catch (\Throwable $th) {
Log::info('System maintenance failed to fresh the cache.');
Log::info('System maintenance failed to clear the view cache.');

return;
return Command::FAILURE;
}

return Command::SUCCESS;
}
}
2 changes: 1 addition & 1 deletion config/speedtest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/
'build_date' => Carbon::parse('2024-02-07'),

'build_version' => 'v0.15.1',
'build_version' => 'v0.15.2',

/**
* General
Expand Down