Browse Source

fix(tasks): add a task notification template

pull/1037/head
colin 1 year ago
parent
commit
c9913c3336
  1. 9
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Notifications/LINGYUN/Abp/BackgroundTasks/Notifications/BackgroundTasksNotificationDefinitionProvider.cs

9
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks.Notifications/LINGYUN/Abp/BackgroundTasks/Notifications/BackgroundTasksNotificationDefinitionProvider.cs

@ -22,7 +22,8 @@ public class BackgroundTasksNotificationDefinitionProvider : NotificationDefinit
allowSubscriptionToClients: true) allowSubscriptionToClients: true)
.WithProviders( .WithProviders(
NotificationProviderNames.SignalR, NotificationProviderNames.SignalR,
NotificationProviderNames.Emailing); NotificationProviderNames.Emailing)
.WithTemplate(typeof(BackgroundTasksResource));
backgroundTaskGroup.AddNotification( backgroundTaskGroup.AddNotification(
BackgroundTasksNotificationNames.JobExecuteFailed, BackgroundTasksNotificationNames.JobExecuteFailed,
L("Notifications:JobExecuteFailed"), L("Notifications:JobExecuteFailed"),
@ -33,7 +34,8 @@ public class BackgroundTasksNotificationDefinitionProvider : NotificationDefinit
allowSubscriptionToClients: true) allowSubscriptionToClients: true)
.WithProviders( .WithProviders(
NotificationProviderNames.SignalR, NotificationProviderNames.SignalR,
NotificationProviderNames.Emailing); NotificationProviderNames.Emailing)
.WithTemplate(typeof(BackgroundTasksResource));
backgroundTaskGroup.AddNotification( backgroundTaskGroup.AddNotification(
BackgroundTasksNotificationNames.JobExecuteCompleted, BackgroundTasksNotificationNames.JobExecuteCompleted,
L("Notifications:JobExecuteCompleted"), L("Notifications:JobExecuteCompleted"),
@ -44,7 +46,8 @@ public class BackgroundTasksNotificationDefinitionProvider : NotificationDefinit
allowSubscriptionToClients: true) allowSubscriptionToClients: true)
.WithProviders( .WithProviders(
NotificationProviderNames.SignalR, NotificationProviderNames.SignalR,
NotificationProviderNames.Emailing); NotificationProviderNames.Emailing)
.WithTemplate(typeof(BackgroundTasksResource));
} }
protected LocalizableString L(string name) protected LocalizableString L(string name)

Loading…
Cancel
Save