eventq_aws 1.6.2 → 1.6.3

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: abcef0a4b3c689e4914781fa9cf22fbd5894cdaa
4
- data.tar.gz: c8d4e26f3aa69625da9c99d1cb729190bd11ef31
3
+ metadata.gz: a438dcdde3a61596dba2778582d6a3f0ba85c992
4
+ data.tar.gz: 33f1d1a724111e2a762ea971f64a88bdab7745be
5
5
  SHA512:
6
- metadata.gz: 00346e1dd075799d58b1c7d4f3cd584caa059da806fe3db3b2ca555a66c29dc03cad3925e76a374d353b6994ea7f61feb1ee3ee16fb004d110fd80360f9eac6d
7
- data.tar.gz: 1c40a6d904a67e51a74294a560670f5e9fa55ee64cd98de52efae51b695c3a64eb1e4e7944c826e37be5141dbbee978031131cdf16b7afaa02152799c73abd7b
6
+ metadata.gz: 36ca675e36a0a918554ca2e77206cffc751a9f4ef5a6fdd9254d4f6630e7a751bcf0e79a5b4d4cb13df88ae598114ceb7b82252baea5bcc90ffb7a7ca05ddd54
7
+ data.tar.gz: bc5235567f0fce538de4b6fe8f0b6e4ef9f68b84f7d35fd8fd5e7c3982075a81f6f9bd7d902d212ee1cfb56acd5af255138eff322a4fa5da3c743803f05314d1
@@ -12,6 +12,17 @@ module EventQ
12
12
  end
13
13
 
14
14
  @client = options[:client]
15
+
16
+ @visibility_timeout = 300 #5 minutes
17
+ if options.key?(:visibility_timeout)
18
+ @visibility_timeout = options[:visibility_timeout]
19
+ end
20
+
21
+ @message_retention_period = 1209600 #14 days (max aws value)
22
+ if options.key?(:message_retention_period)
23
+ @message_retention_period = options[:message_retention_period]
24
+ end
25
+
15
26
  end
16
27
 
17
28
  def get_queue(queue)
@@ -29,8 +40,8 @@ module EventQ
29
40
  response = @client.sqs.create_queue({
30
41
  queue_name: _queue_name,
31
42
  attributes: {
32
- VISIBILITY_TIMEOUT => 300.to_s,#5 minutes
33
- MESSAGE_RETENTION_PERIOD => 1209600.to_s, #max 14 days
43
+ VISIBILITY_TIMEOUT => @visibility_timeout.to_s,
44
+ MESSAGE_RETENTION_PERIOD => @message_retention_period.to_s
34
45
  }
35
46
  })
36
47
 
@@ -64,7 +75,8 @@ module EventQ
64
75
  @client.sqs.set_queue_attributes({
65
76
  queue_url: url, # required
66
77
  attributes: {
67
- VISIBILITY_TIMEOUT => 300.to_s # 5 minutes
78
+ VISIBILITY_TIMEOUT => @visibility_timeout.to_s,
79
+ MESSAGE_RETENTION_PERIOD => @message_retention_period.to_s
68
80
  }
69
81
  })
70
82
  return url
@@ -1,5 +1,5 @@
1
1
  module EventQ
2
2
  module Amazon
3
- VERSION = "1.6.2"
3
+ VERSION = "1.6.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventq_aws
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.2
4
+ version: 1.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-19 00:00:00.000000000 Z
11
+ date: 2016-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler