acception-subscriber 1.0.2 → 1.1.0

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
  SHA1:
3
- metadata.gz: ce99be2bd0dec64c944e3e9ea90e0e62d099363b
4
- data.tar.gz: db53aaf71a7802f4d7101eeddabce0f5ff9a45d9
3
+ metadata.gz: 14904cb441d5daa072b9f0a5991f8cf963b34105
4
+ data.tar.gz: 0ae2c7fa32dba98a3b767108ccc86fae0d982f22
5
5
  SHA512:
6
- metadata.gz: b0d218cd85326966373a39ee6dcd960b47a8a7cbbf74463c3702f28c1346e9f8de3d2c5cb6542624996da3c281cc895cfe747ec5da497c1d310c73b9fb6777f4
7
- data.tar.gz: 9a05bdd5e4b24358fbbdbd2829e06d127f1388064c496e263ea18124b36f0044291558116d1ba05c99c3564625e31c5b0b643cf01b8e5c38a093abdc0d0066de
6
+ metadata.gz: f1ecf3085b33dba8655e05c0dd9f759e554e74314a8de8b45037611daa73d4ae00557a67e0aa6eb3584262be0637612e32d441b98a3ca80093933ea538ce6ff1
7
+ data.tar.gz: f09ef0ad246690379d40def23bba5ea20814714459e0c2d11773f436df8e46da938beb77a1ce1feeca5ef8fd9bf83e851db9a214f66c5ad4b58151cb6ba5c10b
@@ -31,11 +31,11 @@ module Acception
31
31
  else
32
32
  end
33
33
 
34
- channel.acknowledge delivery_info.delivery_tag
34
+ channel.acknowledge( delivery_info.delivery_tag )
35
35
  rescue => e
36
- debug ANSI.red { "NACK" } + " #{e.message}"
37
- debug ANSI.red { "NACK" } + " #{e.backtrace}"
38
- #channel.nack delivery_info.delivery_tag
36
+ debug ANSI.red { "ERROR" } + " #{e.message}"
37
+ debug ANSI.red { "ERROR" } + " #{e.backtrace}"
38
+ channel.nack delivery_info.delivery_tag
39
39
  end
40
40
 
41
41
  protected
@@ -52,6 +52,7 @@ module Acception
52
52
  session: (headers['session'] || BLANK),
53
53
  type: (exception['class'] || BLANK),
54
54
  stack: (exception['backtrace'] || BLANK) )
55
+ # TODO handle failure as well as success
55
56
  acception.call
56
57
  end
57
58
 
@@ -65,6 +66,11 @@ module Acception
65
66
  content: (headers['type'] || BLANK),
66
67
  content_type: 'text/plain'
67
68
  },
69
+ {
70
+ name: 'exceeded_days',
71
+ content: (headers['exceeded_days'] || BLANK),
72
+ content_type: 'text/plain'
73
+ },
68
74
  {
69
75
  name: 'license-content',
70
76
  content: (headers['content'] || BLANK),
@@ -86,6 +92,7 @@ module Acception
86
92
  content_type: 'application/base64'
87
93
  }
88
94
  ])
95
+ # TODO handle failure as well as success
89
96
  acception.call
90
97
  end
91
98
 
@@ -95,21 +102,6 @@ module Acception
95
102
  return nil
96
103
  end
97
104
 
98
- #def handle_error( channel, payload, e )
99
- #error( ANSI.red { e.message + " | " + e.backtrace.inspect } )
100
- #error_queue( channel ).publish( payload, headers: { application: Acception::Subscriber::APP_ID,
101
- #exception_message: e.message,
102
- #exception_class: e.class.name,
103
- #exception_backtrace: e.backtrace } )
104
- #rescue => ex
105
- #error( ANSI.red { ex.message + " | " + ex.backtrace.inspect } )
106
- #end
107
-
108
- #def requeue( channel, delivery_info, e=nil )
109
- #debug ANSI.yellow { 'REQUEUE ' + e.message }
110
- #channel.reject delivery_info.delivery_tag, REQUEUE
111
- #end
112
-
113
105
  def config
114
106
  Acception::Subscriber.configuration
115
107
  end
@@ -1,7 +1,7 @@
1
1
  module Acception
2
2
  module Subscriber
3
3
 
4
- VERSION = "1.0.2"
4
+ VERSION = "1.1.0"
5
5
 
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acception-subscriber
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - C. Jason Harrelson