Browse Source

Merge pull request #1037 from colinin/task-notification-template

fix(tasks): add a task notification template
pull/1043/head
yx lin 1 year ago
committed by GitHub
parent
commit
5e7ff6fb96
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  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