ruby_event_store-outbox 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db60ea5281225f61b150abd5c7e6cc8e7379f09f20c58ed5f10b234534e43612
|
4
|
+
data.tar.gz: 6a4d1015845ce306d2d9663d3b70fe284fa75ea783960e3c345d5d315d79cc61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3629cebca8b80cf62979c5a1cdcb27e53c63552cbdc73e3b0296d8a4fed1b2715e9a8de5f2eafa69fd3f68a3cb2b77aa2e6209be26f3fa724fc70a59575031a
|
7
|
+
data.tar.gz: 52d9e07cad234988c58453a700fe80a9325e22d68265821afd66ced82d2cbae27d2e0ab0d22b14b761a9faf908e49e766dedb99eca82aa825712e3362b5181a6
|
@@ -44,7 +44,7 @@ module RubyEventStore
|
|
44
44
|
Record.transaction do
|
45
45
|
records_scope = Record.lock.where(format: message_format, enqueued_at: nil)
|
46
46
|
records_scope = records_scope.where(split_key: split_keys) if !split_keys.nil?
|
47
|
-
records = records_scope.order("id ASC").limit(100)
|
47
|
+
records = records_scope.order("id ASC").limit(100).to_a
|
48
48
|
return false if records.empty?
|
49
49
|
|
50
50
|
now = @clock.now.utc
|
@@ -58,12 +58,7 @@ module RubyEventStore
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
-
|
62
|
-
records
|
63
|
-
else
|
64
|
-
records.where("id NOT IN (?)", failed_record_ids)
|
65
|
-
end
|
66
|
-
update_scope.update_all(enqueued_at: now)
|
61
|
+
Record.where(id: records.map(&:id) - failed_record_ids).update_all(enqueued_at: now)
|
67
62
|
|
68
63
|
logger.info "Sent #{records.size} messages from outbox table"
|
69
64
|
return true
|