gorg_service 4.0.1 → 4.0.2

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
  SHA1:
3
- metadata.gz: 3f3029885fc84c7bcd229c9ef66d614160cc3d7c
4
- data.tar.gz: 473716a044dc377f77ad029a9288c78b2fab7da1
3
+ metadata.gz: 0c58bfeb93b9256dedd302e32630e4eab5501afc
4
+ data.tar.gz: 232711b7726b8afee9d5f9adcececc8f5a09312d
5
5
  SHA512:
6
- metadata.gz: 6f36621920ef67496729030caf89d62b25c4db360a771780d4612194ed20c1208db3d3e286622339986a548c2495c4f4d9e63095c855a641e1cc6fbaa8889149
7
- data.tar.gz: 6bcb0a2f616846acc2ff7d394adc900380baf92e0e61d4c20a7375ad38ff490c66624425cdd937cf7ecca9a14cfe04be72e3ebab69dfa662eb5daeed8e5dc5a6
6
+ metadata.gz: 8c7e49c6dd6d9df36301098f9c4f268f4ce1d47687d672b44f2fb308ed3a55272099a8cadbd2ce079dd83286a77af7757b27dbe0d0bd7ef381d83b1037ce5b77
7
+ data.tar.gz: 02dce4c68a373f86d378d4e315a40907f7bbb63cd79936fe43b02a1ec513cb4c10304261026107eb9f36010d96cc04726bc53a22d3bf374938037515c556b52f
data/lib/gorg_service.rb CHANGED
@@ -25,7 +25,7 @@ class GorgService
25
25
  conn: @bunny_session,
26
26
  main_exchange: GorgService.configuration.rabbitmq_exchange_name,
27
27
  app_id:GorgService.configuration.application_id,
28
- deferred_time: GorgService.configuration.rabbitmq_deferred_time,
28
+ deferred_time: GorgService.configuration.rabbitmq_deferred_time.to_i,
29
29
  listened_routing_keys: GorgService.configuration.message_handler_map.keys,
30
30
  )
31
31
 
@@ -33,7 +33,7 @@ class GorgService
33
33
  bunny_session: @bunny_session,
34
34
  message_handler_map:GorgService.configuration.message_handler_map,
35
35
  env: @env,
36
- max_attempts: GorgService.configuration.rabbitmq_max_attempts,
36
+ max_attempts: GorgService.configuration.rabbitmq_max_attempts.to_i,
37
37
  log_routing_key: GorgService.configuration.log_routing_key
38
38
  )
39
39
 
@@ -8,7 +8,7 @@ class GorgService
8
8
 
9
9
  def initialize(bunny_session: nil, env: nil, message_handler_map: {default: DefaultMessageHandler}, max_attempts: 48,log_routing_key:nil)
10
10
  @message_handler_map=message_handler_map
11
- @max_attempts=max_attempts
11
+ @max_attempts=max_attempts.to_i
12
12
  @rmq_connection=bunny_session
13
13
  @log_routing_key=log_routing_key
14
14
 
@@ -58,7 +58,7 @@ class GorgService
58
58
  def process_softfail(e,message)
59
59
  message.log_error(e)
60
60
  GorgService.logger.error "SOFTFAIL ERROR : #{e.message}"
61
- if message.errors.count >= @max_attempts
61
+ if message.errors.count.to_i >= @max_attempts
62
62
  GorgService.logger.info " DISCARD MESSAGE : #{message.errors.count} errors in message log"
63
63
  process_hardfail(HardfailError.new("Too Much SoftError : This message reached the limit of softerror (max: #{@max_attempts})"),message)
64
64
  else
@@ -2,5 +2,5 @@
2
2
  # encoding: utf-8
3
3
 
4
4
  class GorgService
5
- VERSION = "4.0.1"
5
+ VERSION = "4.0.2"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gorg_service
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandre Narbonne
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-30 00:00:00.000000000 Z
11
+ date: 2016-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny