Skip to content

Commit

Permalink
Merge pull request #259 from alphagov/sengi/threadpool
Browse files Browse the repository at this point in the history
Enable concurrency in Bunny worker pool.
  • Loading branch information
sengi authored Apr 24, 2024
2 parents 929390c + 6d5bcfc commit e24f5d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ GEM
sentry-rails (~> 5.3)
sentry-ruby (~> 5.3)
statsd-ruby (~> 1.5)
govuk_message_queue_consumer (4.2.0)
govuk_message_queue_consumer (5.0.0)
bunny (~> 2.17)
govuk_test (4.0.2)
brakeman (>= 5.0.2)
Expand Down
1 change: 1 addition & 0 deletions lib/tasks/document_sync_worker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ namespace :document_sync_worker do
GovukMessageQueueConsumer::Consumer.new(
queue_name: ENV.fetch("PUBLISHED_DOCUMENTS_MESSAGE_QUEUE_NAME"),
processor: PublishingApiMessageProcessor.new,
worker_threads: ENV.fetch("PUBLISHED_DOCUMENTS_MESSAGE_QUEUE_THREADS", 1),
).run
rescue Interrupt
Rails.logger.info("Stopping document sync worker (received interrupt)")
Expand Down

0 comments on commit e24f5d0

Please sign in to comment.