🐛 Fix sql statement

This commit is contained in:
2024-08-18 16:25:07 +08:00
parent 1cce7c9b81
commit 6969a0e76c
2 changed files with 4 additions and 6 deletions

View File

@ -51,7 +51,7 @@ func RunMarkDeletionTask() {
for _, pool := range pendingPools {
lifecycle := fmt.Sprintf("%d seconds", *pool.Config.Data().ExistLifecycle)
tx := database.C.
Where("pool_id = ? AND AND created_at < NOW() - INTERVAL ?", pool.ID, lifecycle).
Where("pool_id = ? AND created_at < NOW() - INTERVAL ?", pool.ID, lifecycle).
Updates(&models.Attachment{CleanedAt: lo.ToPtr(time.Now())})
log.Info().
Str("pool", pool.Alias).