Skip to content

Commit

Permalink
Merge pull request #261 from alphagov/sengi/threadpool
Browse files Browse the repository at this point in the history
Allow tuning AMQP "consumer prefetch" (max unacked).
  • Loading branch information
sengi authored Apr 24, 2024
2 parents 6ce03b3 + b0fd78b commit f68d8de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/tasks/document_sync_worker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ namespace :document_sync_worker do
queue_name: ENV.fetch("PUBLISHED_DOCUMENTS_MESSAGE_QUEUE_NAME"),
processor: PublishingApiMessageProcessor.new,
worker_threads: ENV.fetch("PUBLISHED_DOCUMENTS_MESSAGE_QUEUE_THREADS", 1).to_i,
prefetch: ENV.fetch("PUBLISHED_DOCUMENTS_MESSAGE_QUEUE_MAX_UNACKED", 1).to_i,
).run
rescue Interrupt
Rails.logger.info("Stopping document sync worker (received interrupt)")
Expand Down

0 comments on commit f68d8de

Please sign in to comment.