From b468efc33bd075414269ff32858f0ee720791a1b Mon Sep 17 00:00:00 2001 From: Morgan Pretty Date: Mon, 1 Aug 2022 10:05:30 +1000 Subject: [PATCH] Updated the GarbageCollectionJob to log the number of files it removes --- SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift b/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift index 21abafe58..0777de7a2 100644 --- a/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift +++ b/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift @@ -372,6 +372,8 @@ public enum GarbageCollectionJob: JobExecutor { } catch { deletionErrors.append(error) } } + + SNLog("[GarbageCollectionJob] Removed \(orphanedAttachmentFiles.count) orphaned attachment\(orphanedAttachmentFiles.count == 1 ? "" : "s")") } // Orphaned profile avatar files (actual deletion) @@ -393,6 +395,8 @@ public enum GarbageCollectionJob: JobExecutor { } catch { deletionErrors.append(error) } } + + SNLog("[GarbageCollectionJob] Removed \(orphanedAvatarFiles.count) orphaned avatar image\(orphanedAvatarFiles.count == 1 ? "" : "s")") } // Report a single file deletion as a job failure (even if other content was successfully removed)