From 0ceea6947edaacef95ee24fa534022145d026aa5 Mon Sep 17 00:00:00 2001 From: bedrock-adam Date: Mon, 4 Dec 2023 21:32:39 +1100 Subject: [PATCH] udpate readme --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e07e3d9c..81040d0c 100644 --- a/README.md +++ b/README.md @@ -145,9 +145,14 @@ end ##### a. update block to queue an event handler worker ```ruby -loop do +while running Outboxer::Message.publish! do |outboxer_messageable| - EventHandlerWorker.perform_async({ 'id' => outboxer_messageable.id }) + case outboxer_messageable.class.name + when 'Models::Event' + EventHandlerWorker.perform_async({ 'id' => outboxer_messageable.id }) + + published_events << outboxer_messageable + end end end ```