feat: delete

This commit is contained in:
hashbro
2026-09-01 05:52:29 +08:00
parent e23550e820
commit 3a274f079f
2 changed files with 227 additions and 43 deletions
+12 -2
View File
@@ -71,10 +71,20 @@ class PhotoPreview
if (Storage::disk('local')->directoryExists($dir)) {
Storage::disk('local')->deleteDirectory($dir);
}
} catch (\Throwable) {
} catch (\Throwable $e) {
Log::warning('photo_preview forget_failed', [
'device_key' => $deviceKey,
'dir' => $dir,
'error' => $e->getMessage(),
]);
try {
Storage::disk('local')->deleteDirectory($dir);
} catch (\Throwable) {
} catch (\Throwable $retry) {
Log::warning('photo_preview forget_retry_failed', [
'device_key' => $deviceKey,
'dir' => $dir,
'error' => $retry->getMessage(),
]);
}
}
}