Update MediaDeletePipeline, fix async media deletion

This commit is contained in:
Daniel Supernault 2022-06-19 06:52:06 -06:00
parent 1eba7f810a
commit bb1cccbe03
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
3 changed files with 5 additions and 5 deletions

View file

@ -51,10 +51,10 @@ class MediaGarbageCollector extends Command
$bar = $this->output->createProgressBar($gc->count());
$bar->start();
foreach($gc as $media) {
MediaStorageService::delete($media);
$media->forceDelete();
MediaStorageService::delete($media, true);
$bar->advance();
}
$bar->finish();
$this->line('');
}
}

View file

@ -228,8 +228,6 @@ class ComposeController extends Controller
MediaStorageService::delete($media, true);
$media->forceDelete();
return response()->json([
'msg' => 'Successfully deleted',
'code' => 200

View file

@ -57,7 +57,9 @@ class MediaDeletePipeline implements ShouldQueue
$disk->deleteDirectory($i);
}
return 1;
$media->forceDelete();
return;
}
}