summaryrefslogtreecommitdiff
path: root/internal/cleaner/emoji.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cleaner/emoji.go')
-rw-r--r--internal/cleaner/emoji.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/internal/cleaner/emoji.go b/internal/cleaner/emoji.go
index 245dfac27..e72ee9665 100644
--- a/internal/cleaner/emoji.go
+++ b/internal/cleaner/emoji.go
@@ -41,10 +41,16 @@ func (e *Emoji) All(ctx context.Context, maxRemoteDays int) {
e.LogUncacheRemote(ctx, t)
e.LogFixBroken(ctx)
e.LogPruneUnused(ctx)
- e.LogFixCacheStates(ctx)
_ = e.state.Storage.Storage.Clean(ctx)
}
+// AllAndFix calls LogFixCacheStates(), followed by All(), it
+// is done this way round so Storage.Clean() is performed last.
+func (e *Emoji) AllAndFix(ctx context.Context, maxRemoteDays int) {
+ e.LogFixCacheStates(ctx)
+ e.All(ctx, maxRemoteDays)
+}
+
// LogUncacheRemote performs Emoji.UncacheRemote(...), logging the start and outcome.
func (e *Emoji) LogUncacheRemote(ctx context.Context, olderThan time.Time) {
log.Infof(ctx, "start older than: %s", olderThan.Format(time.Stamp))