grumlin 0.22.1 → 0.22.2

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: 8f91cc8f8b58fc3d72726e876dabac6a8f167e81bd524907eef4df7d72802e79
4
- data.tar.gz: 892fa89f75c999899ff0869c7c6f74c26526b9eb5a6da0b43bd4df8a1b64504a
3
+ metadata.gz: 23a0ce8dacaf7c4add38674353e6aa69e51ebd9865ed83c3112f62ad96a5d213
4
+ data.tar.gz: 775c7c6009e6969d9a2b060772dc5d6caf9846267050509a5aeccf1bd5050e0c
5
5
  SHA512:
6
- metadata.gz: 5d50c9b36f4a69a431620404b333b71c8fd9ca2fd8a6b2689c6ece3da57198de4cfa294adaf631238ca1186581eaa3b74a9ec8dea6e6f50f69a977a78ea71a79
7
- data.tar.gz: 3f201c437eee80beac09bb76f121542f7c611b68ce513545fb46d6c44790cf061527564e5f9c03e4f55e51c70c67e355802d0e63e64004d4db36de135f110750
6
+ metadata.gz: 6b9a820912679a67ca1be3545130ee3affcf89bea1bd9085a47f18d4b0c2ed6583ebfe5e7c52c339d93efe672d7ec7d5e604a68681581a4c57f6b21d8dce9e21
7
+ data.tar.gz: a5d371995de61123f954361143f98427af0109831c189bb1ad60cdf722109c72749872478096aa60de22bc7d3139825fdf1ed07c8cce2330eca51cb5865fc6f9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grumlin (0.22.1)
4
+ grumlin (0.22.2)
5
5
  async-pool (~> 0.3)
6
6
  async-websocket (~> 0.19)
7
7
  oj (~> 3.13)
@@ -18,11 +18,19 @@ module Grumlin
18
18
  # {"detailedMessage":"",
19
19
  # "requestId":"UUID",
20
20
  # "code":"ConcurrentModificationException"}
21
- # Currencly we simply search for substings to identify the exact error
21
+ # Currently we simply search for substrings to identify the exact error
22
22
  # TODO: parse json and use `code` instead
23
+
23
24
  VERTEX_ALREADY_EXISTS = "Vertex with id already exists:"
24
25
  EDGE_ALREADY_EXISTS = "Edge with id already exists:"
26
+
25
27
  CONCURRENT_VERTEX_INSERT_FAILED = "Failed to complete Insert operation for a Vertex due to conflicting concurrent"
28
+
29
+ CONCURRENT_VERTEX_PROPERTY_INSERT_FAILED =
30
+ "Failed to complete Insert operation for a VertexProperty due to conflicting concurrent"
31
+ CONCURRENT_EDGE_PROPERTY_INSERT_FAILED =
32
+ "Failed to complete Insert operation for a EdgeProperty due to conflicting concurrent"
33
+
26
34
  CONCURRENT_EDGE_INSERT_FAILED = "Failed to complete Insert operation for an Edge due to conflicting concurrent"
27
35
  CONCURRENCT_MODIFICATION_FAILED = "Failed to complete operation due to conflicting concurrent"
28
36
 
@@ -49,9 +57,15 @@ module Grumlin
49
57
  return EdgeAlreadyExistsError if status[:message]&.include?(EDGE_ALREADY_EXISTS)
50
58
  end
51
59
 
52
- def concurrent_modification_error(status)
60
+ def concurrent_modification_error(status) # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
53
61
  return ConcurrentVertexInsertFailedError if status[:message]&.include?(CONCURRENT_VERTEX_INSERT_FAILED)
62
+ if status[:message]&.include?(CONCURRENT_VERTEX_PROPERTY_INSERT_FAILED)
63
+ return ConcurrentVertexPropertyInsertFailedError
64
+ end
54
65
  return ConcurrentEdgeInsertFailedError if status[:message]&.include?(CONCURRENT_EDGE_INSERT_FAILED)
66
+ if status[:message]&.include?(CONCURRENT_EDGE_PROPERTY_INSERT_FAILED)
67
+ return ConcurrentEdgePropertyInsertFailedError
68
+ end
55
69
  return ConcurrentModificationError if status[:message]&.include?(CONCURRENCT_MODIFICATION_FAILED)
56
70
  end
57
71
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Grumlin
4
- VERSION = "0.22.1"
4
+ VERSION = "0.22.2"
5
5
  end
data/lib/grumlin.rb CHANGED
@@ -107,6 +107,9 @@ module Grumlin
107
107
  class ConcurrentVertexInsertFailedError < ConcurrentInsertFailedError; end
108
108
  class ConcurrentEdgeInsertFailedError < ConcurrentInsertFailedError; end
109
109
 
110
+ class ConcurrentVertexPropertyInsertFailedError < ConcurrentInsertFailedError; end
111
+ class ConcurrentEdgePropertyInsertFailedError < ConcurrentInsertFailedError; end
112
+
110
113
  class ServerSerializationError < ServerSideError; end
111
114
 
112
115
  class ServerTimeoutError < ServerSideError; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grumlin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.1
4
+ version: 0.22.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Sinyavskiy