using LINGYUN.Abp.BackgroundTasks; using LINGYUN.Abp.Notifications; using System.Threading.Tasks; namespace LY.MicroService.RealtimeMessage.BackgroundJobs; public class NotificationCleanupJob : IJobRunnable { /// /// 每次清除记录大小 /// public const string PropertyBatchCount = "BatchCount"; public async virtual Task ExecuteAsync(JobRunnableContext context) { var count = context.GetJobData(PropertyBatchCount); var store = context.GetRequiredService(); await store.DeleteNotificationAsync(count); } }