Fixes for invoking Public filesystem driver unnecessarily

This commit is contained in:
David Bomba 2021-11-25 08:04:25 +11:00
parent cb07c1df9c
commit 47be74321c
2 changed files with 5 additions and 3 deletions

View File

@ -3,6 +3,7 @@
namespace App\Console\Commands;
use App\Models\Company;
use App\Utils\Ninja;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
@ -42,6 +43,10 @@ class S3Cleanup extends Command
public function handle()
{
if(!Ninja::isHosted())
return;
$c1 = Company::on('db-ninja-01')->pluck('company_key');
$c2 = Company::on('db-ninja-02')->pluck('company_key');

View File

@ -42,8 +42,5 @@ class DiskCleanup implements ShouldQueue
$files = Storage::allFiles(config('filesystems.default'), 'backups/');
Storage::delete($files);
$files = Storage::allFiles('public', 'backups/');
Storage::delete($files);
}
}