Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var All action.GTSAction = func(ctx context.Context) error { prune, err := setupPrune(ctx) if err != nil { return err } defer func() { if err := prune.shutdown(); err != nil { log.Error(ctx, err) } }() if config.GetAdminMediaPruneDryRun() { log.Info(ctx, "prune DRY RUN") ctx = gtscontext.SetDryRun(ctx) } days := config.GetMediaRemoteCacheDays() prune.cleaner.Media().All(ctx, days) prune.cleaner.Emoji().All(ctx, days) if err := prune.storage.Storage.Clean(ctx); err != nil { log.Error(ctx, "error cleaning storage: %v", err) } return nil }
All performs all media clean actions
View Source
var Orphaned action.GTSAction = func(ctx context.Context) error { prune, err := setupPrune(ctx) if err != nil { return err } defer func() { if err := prune.shutdown(); err != nil { log.Error(ctx, err) } }() if config.GetAdminMediaPruneDryRun() { log.Info(ctx, "prune DRY RUN") ctx = gtscontext.SetDryRun(ctx) } prune.cleaner.Media().LogPruneOrphaned(ctx) if err := prune.storage.Storage.Clean(ctx); err != nil { log.Error(ctx, "error cleaning storage: %v", err) } return nil }
Orphaned prunes orphaned media from storage.
View Source
var Remote action.GTSAction = func(ctx context.Context) error { prune, err := setupPrune(ctx) if err != nil { return err } defer func() { if err := prune.shutdown(); err != nil { log.Error(ctx, err) } }() if config.GetAdminMediaPruneDryRun() { log.Info(ctx, "prune DRY RUN") ctx = gtscontext.SetDryRun(ctx) } t := time.Now().Add(-24 * time.Hour * time.Duration(config.GetMediaRemoteCacheDays())) prune.cleaner.Media().LogPruneUnused(ctx) prune.cleaner.Media().LogUncacheRemote(ctx, t) if err := prune.storage.Storage.Clean(ctx); err != nil { log.Error(ctx, "error cleaning storage: %v", err) } return nil }
Remote prunes old and/or unused remote media.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.