Batch support
If an app uses worker with the:batch => true option, multiple messages are processed by a worker in the same tick. An upgrade is required to Ruby gem 2.11.3 or higher, which adds support for the batch option.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
:batch => true option, multiple messages are processed by a worker in the same tick. An upgrade is required to Ruby gem 2.11.3 or higher, which adds support for the batch option.
# my_worker.rb
class MyWorker
include Shoryuken::Worker
shoryuken_options :queue => "batched", :batch => true
def perform(sqs_msg, body)
# Do stuff
puts "Performing BatchedWorker job: #{body}"
sleep 1
end
end
Was this page helpful?