1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00

fix(message-dequeuer): ability to disable batching

هذا الالتزام موجود في:
Adam Cooke
2024-03-16 15:31:46 +00:00
الأصل 45dd8aaac5
التزام 4fcb9e9a2e
5 ملفات معدلة مع 32 إضافات و7 حذوفات

عرض الملف

@@ -17,7 +17,7 @@ module MessageDequeuer
# Process the original message and then all of those
# found for batching.
process_message(@queued_message)
@other_messages.each { |message| process_message(message) }
@other_messages&.each { |message| process_message(message) }
end
ensure
@state.finished
@@ -45,6 +45,8 @@ module MessageDequeuer
end
def find_other_messages_for_batch
return unless Postal::Config.postal.batch_queued_messages?
@other_messages = @queued_message.batchable_messages(100)
log "found #{@other_messages.size} associated messages to process at the same time", batch_key: @queued_message.batch_key
rescue StandardError