From c96898e5c6a05bfe4770ee7862d5897d866f99f5 Mon Sep 17 00:00:00 2001 From: bedrock-adam Date: Mon, 13 Oct 2025 22:14:05 +1100 Subject: [PATCH 1/3] fix return values --- lib/outboxer/message.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/outboxer/message.rb b/lib/outboxer/message.rb index 601a8f83..c7247f13 100644 --- a/lib/outboxer/message.rb +++ b/lib/outboxer/message.rb @@ -339,7 +339,7 @@ def published(id:, lock_version:, time: ::Time) .where(status: Status::PUBLISHED, partition: partition) .update_all(["value = value + ?, updated_at = ?", 1, current_utc_time]) - {} + { id: message.id } end end end @@ -398,6 +398,7 @@ def publishing_failed(id:, lock_version:, error: nil, time: ::Time) .update_all(["value = value + ?, updated_at = ?", 1, current_utc_time]) { + id: message.id, lock_version: message.lock_version } end @@ -562,7 +563,7 @@ def requeue(id:, lock_version:, publisher_id: nil, publisher_name: nil, .where(status: message.status, partition: partition) .update_all(["value = value + ?, updated_at = ?", 1, current_utc_time]) - { id: id } + { id: id, lock_version: lock_version } end end end From 24c4d44ccd0bbff9fbce445b88ba159988f1c0a4 Mon Sep 17 00:00:00 2001 From: bedrock-adam Date: Mon, 13 Oct 2025 22:17:06 +1100 Subject: [PATCH 2/3] update --- lib/outboxer/message.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/outboxer/message.rb b/lib/outboxer/message.rb index c7247f13..e8d1f194 100644 --- a/lib/outboxer/message.rb +++ b/lib/outboxer/message.rb @@ -563,7 +563,10 @@ def requeue(id:, lock_version:, publisher_id: nil, publisher_name: nil, .where(status: message.status, partition: partition) .update_all(["value = value + ?, updated_at = ?", 1, current_utc_time]) - { id: id, lock_version: lock_version } + { + id: id, + lock_version: lock_version + } end end end From ca39aa21a903ec3bfb4da4d2f2b4ca13eaefb413 Mon Sep 17 00:00:00 2001 From: bedrock-adam Date: Mon, 13 Oct 2025 22:17:33 +1100 Subject: [PATCH 3/3] update formatting --- lib/outboxer/message.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/outboxer/message.rb b/lib/outboxer/message.rb index e8d1f194..e4e56655 100644 --- a/lib/outboxer/message.rb +++ b/lib/outboxer/message.rb @@ -339,7 +339,9 @@ def published(id:, lock_version:, time: ::Time) .where(status: Status::PUBLISHED, partition: partition) .update_all(["value = value + ?, updated_at = ?", 1, current_utc_time]) - { id: message.id } + { + id: message.id + } end end end