Skip to content

Commit

Permalink
Fixes #37170 - Remove Subscription-Entitlement notification
Browse files Browse the repository at this point in the history
  • Loading branch information
sjha4 committed Feb 15, 2024
1 parent 89a802a commit 4513f5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class RemoveSubscriptionMailerNotification < ActiveRecord::Migration[6.1]
def change
subscriptions_expiring_soon_mailer = MailNotification.find_by(name: "subscriptions_expiring_soon")
subscriptions_expiring_soon_mailer&.delete
ForemanTasks::Task.find_by(state: "scheduled", label: "SendExpireSoonNotifications")&.destroy!
end
end
8 changes: 0 additions & 8 deletions db/seeds.d/106-mail_notifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@
:subscription_type => 'alert'
},

{:name => :subscriptions_expiring_soon,
: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',
Expand Down
2 changes: 1 addition & 1 deletion lib/katello/scheduled_jobs.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# First, we check if there's a job already enqueued for any notifications
::Foreman::Application.dynflow.config.on_init do |world|
[CreateExpiredManifestNotifications, CreateHostLifecycleExpireSoonNotifications, CreatePulpDiskSpaceNotifications, SendExpireSoonNotifications].each do |job_class|
[CreateExpiredManifestNotifications, CreateHostLifecycleExpireSoonNotifications, CreatePulpDiskSpaceNotifications].each do |job_class|
job_class.spawn_if_missing(world)
end
end

0 comments on commit 4513f5e

Please sign in to comment.