deimos-ruby 1.19.beta1 → 1.19.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deimos/active_record_consume/batch_consumption.rb +3 -5
- data/lib/deimos/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c460892f0e27ef50137442b4ca2a1328479c54fe47b65850575e7ef3ff769ff7
|
4
|
+
data.tar.gz: 57cbd04c1d2bb0582579ef9b0413c38cd4de4dcca682ca0ff201564815960d6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c07bdf21830aa08b0151ad5db8291ebe597fac4265592ab549db6583ada6043765d92052cd7a6bae6f2264b2cbd15242659b8e108572bb32aaca710eb3fdc740
|
7
|
+
data.tar.gz: 5c51d92c8956f54fe8a689015e46c195ab8ee2b543555c2b8e9b1263d3e58c3411b2263283a46e2f29bdf467f4b8d1cb49af528c8dc2d5450d98e5f5481b60ff
|
@@ -87,7 +87,7 @@ module Deimos
|
|
87
87
|
# records to either be updated or inserted.
|
88
88
|
# @return [void]
|
89
89
|
def upsert_records(messages)
|
90
|
-
key_cols = key_columns(messages,
|
90
|
+
key_cols = key_columns(messages, @klass)
|
91
91
|
|
92
92
|
# Create ActiveRecord Models with payload + key attributes
|
93
93
|
upserts = build_records(messages)
|
@@ -172,12 +172,10 @@ module Deimos
|
|
172
172
|
# batch. Requires at least one record.
|
173
173
|
# The parameters are mutually exclusive. records is used by default implementation.
|
174
174
|
# @param records [Array<Message>] Non-empty list of messages.
|
175
|
-
# @param
|
175
|
+
# @param _klass [ActiveRecord::Class] Class Name can be used to fetch columns
|
176
176
|
# @return [Array<String>] List of attribute names.
|
177
177
|
# @raise If records is empty.
|
178
|
-
def key_columns(records,
|
179
|
-
raise 'Must implement key_columns method for associations!' unless klass.nil?
|
180
|
-
|
178
|
+
def key_columns(records, _klass)
|
181
179
|
raise 'Cannot determine key from empty batch' if records.empty?
|
182
180
|
|
183
181
|
first_key = records.first.key
|
data/lib/deimos/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deimos-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.19.
|
4
|
+
version: 1.19.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Orner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: avro_turf
|