Skip to content

Commit a5ecdb0

Browse files
authored
Merge pull request #1276 from colinin/remove-user-expired-notifications
fix(notifications): fixed expired expired notices jobs
2 parents d508c44 + c49db6a commit a5ecdb0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

aspnet-core/modules/task-management/LINGYUN.Abp.Notifications.Jobs/LINGYUN/Abp/Notifications/Jobs/NotificationCleanupJob.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using LINGYUN.Abp.BackgroundTasks;
22
using System.Collections.Generic;
33
using System.Threading.Tasks;
4+
using Volo.Abp.MultiTenancy;
5+
using Volo.Abp.Timing;
46

57
namespace LINGYUN.Abp.Notifications.Jobs;
68

@@ -24,8 +26,10 @@ public class NotificationCleanupJob : IJobRunnable
2426
public async virtual Task ExecuteAsync(JobRunnableContext context)
2527
{
2628
var count = context.GetJobData<int>(PropertyBatchCount);
29+
var clock = context.GetRequiredService<IClock>();
2730
var store = context.GetRequiredService<INotificationStore>();
31+
var currentTenant = context.GetRequiredService<ICurrentTenant>();
2832

29-
await store.DeleteNotificationAsync(count);
33+
await store.DeleteExpritionNotificationAsync(currentTenant.Id, count, clock.Now);
3034
}
3135
}

0 commit comments

Comments
 (0)