mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Update MediaDeletePipeline, fix async media deletion
This commit is contained in:
parent
1eba7f810a
commit
bb1cccbe03
3 changed files with 5 additions and 5 deletions
|
@ -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('');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -228,8 +228,6 @@ class ComposeController extends Controller
|
|||
|
||||
MediaStorageService::delete($media, true);
|
||||
|
||||
$media->forceDelete();
|
||||
|
||||
return response()->json([
|
||||
'msg' => 'Successfully deleted',
|
||||
'code' => 200
|
||||
|
|
|
@ -57,7 +57,9 @@ class MediaDeletePipeline implements ShouldQueue
|
|||
$disk->deleteDirectory($i);
|
||||
}
|
||||
|
||||
return 1;
|
||||
$media->forceDelete();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue