feat: media duplicate purge, part 2 of 3: the automatic purge scheduler (Go only)
This commit is contained in:
1 parent
e82d0ce254
commit
1a55a39425
18 files changed
+1389
-39
No files matched your search
@@ -46,3 +46,11 @@ func (s Settings) NextPurgeAt() *time.Time {
|
||||
next := base.AddDate(0, 0, s.AutoPurgeIntervalDays)
|
||||
return &next
|
||||
}
|
||||
|
||||
type RunResult struct {
|
||||
GroupsTotal int
|
||||
GroupsPurged int
|
||||
Merged int
|
||||
ArticlesUpdated int
|
||||
FailedGroups int
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package purge
|
||||
|
||||
import "time"
|
||||
|
||||
type Repository interface {
|
||||
Get() (Settings, error)
|
||||
Save(settings Settings) error
|
||||
SaveLastRun(at time.Time, merged int, articlesUpdated int) error
|
||||
}
|
||||
Reference in new issue
Block a user