wolf_core 1.0.118 → 1.0.119

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e7be85b330af54c101fcafa0de225244fbd44ff74bd0df5b364a834e6e3ddf7
4
- data.tar.gz: 128549aa666736df426523dcab5eb67284af821c25cfe0a2142525eefeb789e1
3
+ metadata.gz: 22a2db60fab6d2155e9981f50b16273fb5ea14f46ce923f41dc84c4a672cda78
4
+ data.tar.gz: a33cf7882a2fb3207b1f295f5cdb530f55137ca0864508f2d7c971f93012978e
5
5
  SHA512:
6
- metadata.gz: d96f3cfcea3e2a8c1545a46b4dd495f5103c89ac17fbe94dbf642bddaecc56fbc4c4a2012162c8e231cbcc56e30deb29f88ece7c6502c2a594d03b02b7c347ce
7
- data.tar.gz: 41f6f33b2619b4c7adff40def9aa82c3c707799f451d2bf3ba3697dc9c5aae98326dd7221424e011ba7d515b421c18af8a2a259b50d1588f2f9cf1b6214732dc
6
+ metadata.gz: a11fe698d04d4d5e15aeff77ff0addf8afde0093d90b6004f3d7960d0c7c0aaa084a5fc58aebc1c140592185bade94feb5ee42bac13cd36eebfdb4e8a691a4c4
7
+ data.tar.gz: c04338ceca3821bc223d260669558dada73e74fa8c43a7885229bb923608bfb370ee4b9f2a72dea5c3c3a2fba4a0e389f9178194ce34dc60cff2fb0dbe59337c
@@ -8,6 +8,8 @@ module WolfCore
8
8
  def call
9
9
  process
10
10
  rescue StandardError => e
11
+ on_timeout(e) if is_timeout_error?(e) && respond_to?(:on_timeout)
12
+
11
13
  common_data = { backtrace: e.backtrace }
12
14
  common_data.merge!(build_result_data) if respond_to?(:build_result_data)
13
15
  if e.instance_of?(WolfCore::ServiceException)
@@ -95,5 +97,11 @@ module WolfCore
95
97
  puts "wolf token is #{wolf_token}"
96
98
  wolf_token
97
99
  end
100
+
101
+ private
102
+
103
+ def is_timeout_error?(exception)
104
+ [Net::OpenTimeout, Net::ReadTimeout, Net::WriteTimeout].any? { |ex| exception.is_a?(ex) }
105
+ end
98
106
  end
99
107
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.118"
4
+ VERSION = "1.0.119"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wolf_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.118
4
+ version: 1.0.119
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Roncallo