mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-04 18:04:16 +02:00
Fix RemoveOldNotificationsWorker.cs: RemoveRange
This commit is contained in:
@ -11,7 +11,7 @@ public class RemoveOldNotificationsWorker(TimeSpan? interval = null, IEnumerable
|
||||
protected override BaseWorker[] DoWorkInternal()
|
||||
{
|
||||
IQueryable<Notification> toRemove = DbContext.Notifications.Where(n => n.IsSent || DateTime.UtcNow - n.Date > Interval);
|
||||
DbContext.Remove(toRemove);
|
||||
DbContext.RemoveRange(toRemove);
|
||||
DbContext.Sync();
|
||||
return [];
|
||||
}
|
||||
|
Reference in New Issue
Block a user