Skip to content

Commit

Permalink
Merge pull request #2889 from alphagov/sengi/rm-mq-statsd
Browse files Browse the repository at this point in the history
Stop passing statsd (deprecated) to MQ client.
  • Loading branch information
sengi authored Apr 24, 2024
2 parents 9d0ccff + a8045a2 commit 9fa473e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
3 changes: 0 additions & 3 deletions lib/tasks/message_queue.rake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace :message_queue do
GovukMessageQueueConsumer::Consumer.new(
queue_name: "search_api_to_be_indexed",
processor: Indexer::MessageProcessor.new,
statsd_client: Services.statsd_client,
).run
end

Expand All @@ -26,7 +25,6 @@ namespace :message_queue do
GovukMessageQueueConsumer::Consumer.new(
queue_name: "search_api_govuk_index",
processor: GovukIndex::PublishingEventProcessor.new,
statsd_client: Services.statsd_client,
).run
end

Expand All @@ -35,7 +33,6 @@ namespace :message_queue do
GovukMessageQueueConsumer::Consumer.new(
queue_name: "search_api_bulk_reindex",
processor: GovukIndex::PublishingEventProcessor.new,
statsd_client: Services.statsd_client,
).run
end
end
4 changes: 0 additions & 4 deletions spec/unit/tasks/message_queue_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
RSpec.describe Indexer::MessageProcessor, "RakeTest" do
context "when indexing published documents to publishing-api" do
it "use GovukMessageQueueConsumer::Consumer" do
statsd_client = Statsd.new
expect(Services).to receive(:statsd_client).and_return(statsd_client)

indexer = described_class.new
expect(described_class).to receive(:new).and_return(indexer)

Expand All @@ -18,7 +15,6 @@
.with(
queue_name: "search_api_to_be_indexed",
processor: indexer,
statsd_client:,
).and_return(consumer)

Rake::Task["message_queue:listen_to_publishing_queue"].invoke
Expand Down

0 comments on commit 9fa473e

Please sign in to comment.