Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Remove unpublishing queue for Email Alert Service
Browse files Browse the repository at this point in the history
This is after deploying the previous change [1] to actually remove
the resource, which were marked as absent. The original commits are
quite scattered [2][3][4], but this seems to cover everything.

[1]: #10926
[2]: c0eace2
[3]: 31a0a14
[4]: 3d119d2
  • Loading branch information
Ben Thorner committed Jan 19, 2021
1 parent 5648cf0 commit 9d1a19b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 29 deletions.
1 change: 0 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ task :check_consistency_between_aws_and_carrenza do
govuk::apps::email_alert_api::unicorn_worker_processes
govuk::apps::email_alert_frontend::redis_host
govuk::apps::email_alert_frontend::redis_port
govuk::apps::email_alert_service::enable_unpublishing_queue_consumer
govuk::apps::email_alert_service::enabled
govuk::apps::email_alert_service::rabbitmq::queue_size_critical_threshold
govuk::apps::email_alert_service::rabbitmq::queue_size_warning_threshold
Expand Down
1 change: 0 additions & 1 deletion hieradata_aws/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,6 @@ govuk::apps::email_alert_frontend::redis_host: "%{hiera('sidekiq_host')}"
govuk::apps::email_alert_frontend::redis_port: "%{hiera('sidekiq_port')}"

govuk::apps::email_alert_service::enabled: true
govuk::apps::email_alert_service::enable_unpublishing_queue_consumer: true
govuk::apps::email_alert_service::rabbitmq_hosts:
- rabbitmq
govuk::apps::email_alert_service::redis_host: "%{hiera('sidekiq_host')}"
Expand Down
7 changes: 0 additions & 7 deletions modules/govuk/manifests/apps/email_alert_service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,6 @@
command => 'bundle exec rake message_queues:major_change_consumer',
}

govuk::procfile::worker { 'email-alert-service-unpublishing-queue-consumer':
ensure => absent,
setenv_as => $app_name,
process_type => 'unpublishing-queue-consumer',
process_regex => '\/rake message_queues:unpublishing_consumer',
}

Govuk::App::Envvar {
ensure => $ensure,
app => 'email-alert-service',
Expand Down
23 changes: 3 additions & 20 deletions modules/govuk/manifests/apps/email_alert_service/rabbitmq.pp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
$amqp_pass = 'email_alert_service',
$amqp_exchange = 'published_documents',
$amqp_major_change_queue = 'email_alert_service',
$amqp_unpublishing_queue = 'email_unpublishing',
$queue_size_critical_threshold,
$queue_size_warning_threshold,
) {
Expand All @@ -59,27 +58,11 @@
warning_threshold => $queue_size_warning_threshold,
} ->

govuk_rabbitmq::queue_with_binding { $amqp_unpublishing_queue:
ensure => absent,
amqp_exchange => $amqp_exchange,
amqp_queue => $amqp_unpublishing_queue,
routing_key => 'redirect.unpublish.#',
durable => true,
} ->

govuk_rabbitmq::monitor_messages {"${amqp_unpublishing_queue}_message_monitoring":
ensure => absent,
rabbitmq_hostname => 'localhost',
rabbitmq_queue => $amqp_unpublishing_queue,
critical_threshold => $queue_size_critical_threshold,
warning_threshold => $queue_size_warning_threshold,
} ->

govuk_rabbitmq::consumer { $amqp_user:
ensure => $ensure,
amqp_pass => $amqp_pass,
read_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_unpublishing_queue}|${amqp_exchange})\$",
write_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_unpublishing_queue})\$",
configure_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_unpublishing_queue})\$",
read_permission => "^(amq\\.gen.*|${amqp_major_change_queue}|${amqp_exchange})\$",
write_permission => "^(amq\\.gen.*|${amqp_major_change_queue}\$",
configure_permission => "^(amq\\.gen.*|${amqp_major_change_queue}\$",
}
}

0 comments on commit 9d1a19b

Please sign in to comment.