db/seeds.d/106-mail_notifications.rb in katello-4.10.0 vs db/seeds.d/106-mail_notifications.rb in katello-4.11.0.rc1
- old
+ new
@@ -7,10 +7,14 @@
# The notification names are used as humanized labels. These need to be
# translated as well as the description
N_('Host errata advisory')
N_('Sync errata')
N_('Promote errata')
+ N_('Repository sync failure')
+ N_('Content view publish failure')
+ N_('Content view promote failure')
+ N_('Proxy sync failure')
# Mail Notifications
notifications = [
{:name => :host_errata_advisory,
:description => N_('A summary of available and applicable errata for your hosts'),
@@ -37,9 +41,37 @@
:description => N_('A list of subscriptions expiring soon'),
:mailer => 'Katello::SubscriptionMailer',
:method => 'subscription_expiry',
:subscription_type => 'report',
:queryable => true
+ },
+
+ {:name => :repository_sync_failure,
+ :description => N_('A notification about failed repository sync'),
+ :mailer => 'Katello::TaskMailer',
+ :method => 'repo_sync_failure',
+ :subscription_type => 'alert'
+ },
+
+ {:name => :content_view_publish_failure,
+ :description => N_('A notification about failed content view publish'),
+ :mailer => 'Katello::TaskMailer',
+ :method => 'cv_publish_failure',
+ :subscription_type => 'alert'
+ },
+
+ {:name => :content_view_promote_failure,
+ :description => N_('A notification about failed content view promotion'),
+ :mailer => 'Katello::TaskMailer',
+ :method => 'cv_promote_failure',
+ :subscription_type => 'alert'
+ },
+
+ {:name => :proxy_sync_failure,
+ :description => N_('A notification about failed proxy sync'),
+ :mailer => 'Katello::TaskMailer',
+ :method => 'proxy_sync_failure',
+ :subscription_type => 'alert'
}
]
notifications.each do |notification|
::MailNotification.where(name: notification[:name]).first_or_create!(notification)