Skip to content

Commit

Permalink
fix auto-delete (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
buixor authored Jul 20, 2020
1 parent 0864f13 commit 66161bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/database/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *Context) CleanUpRecordsByAge() error {

//look for soft-deleted events that are OLDER than maxDurationRetention
ret := c.Db.Unscoped().Table("ban_applications").Where("deleted_at is not NULL").
Where("deleted_at > ?", time.Now().Add(-c.maxDurationRetention)).
Where("deleted_at < ?", time.Now().Add(-c.maxDurationRetention)).
Order("updated_at desc").Find(&sos)

if ret.Error != nil {
Expand Down

0 comments on commit 66161bc

Please sign in to comment.