alephant-sequencer 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/sequencer/sequence_table.rb +12 -15
- data/lib/alephant/sequencer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e18b0c6e698768dce4f614890d9ce4bef61f0cb7
|
4
|
+
data.tar.gz: c644ddf1987bef172626151badd5834c2d0af925
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7972baac0d4095ab9e5add8bee3ead2ccbc733003d179cf1246a72efe622e436c8f3aafb5ee71a886e3ac46f69f94de1741e1386b63cdc24ca3a1efbfbdc6c8f
|
7
|
+
data.tar.gz: 3531b8a5734af6f6d49cce71c401e28168537359383e76901ec08d31ddf1394c3c7094d07e6e15766a30c9623c4720a3cffd842ba28682b26af7695f0a95c1d1
|
@@ -39,21 +39,18 @@ module Alephant
|
|
39
39
|
current_sequence = last_seen_check.nil? ? sequence_for(ident) : last_seen_check
|
40
40
|
|
41
41
|
dynamo_response = @mutex.synchronize do
|
42
|
-
client.put_item(
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
}
|
55
|
-
},
|
56
|
-
conditional_operator: 'OR')
|
42
|
+
client.put_item(
|
43
|
+
table_name: table_name,
|
44
|
+
item: {
|
45
|
+
'key' => ident,
|
46
|
+
'value' => value
|
47
|
+
},
|
48
|
+
condition_expression: ':current_value < :new_value',
|
49
|
+
expression_attribute_values: {
|
50
|
+
':current_value' => current_sequence,
|
51
|
+
':new_value' => value
|
52
|
+
}
|
53
|
+
)
|
57
54
|
end
|
58
55
|
|
59
56
|
logger.metric('SequencerFailedConditionalChecks', value: 0)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-sequencer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BBC News
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|