fastly_nsq 1.11.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ChangeLog.md +9 -1
- data/lib/fastly_nsq/cli.rb +4 -6
- data/lib/fastly_nsq/feeder.rb +11 -1
- data/lib/fastly_nsq/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4b3aa79b5a426f1f7fa76eb8e255d54aaa30d638d20e6d097fa964533411412d
|
4
|
+
data.tar.gz: c10d1e27b816a461a44240a334cd0e301e8286d7048e146fa2349d28d8b2c82a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e29c14106a807b2f956bddee68bd9befa466b3ef2cb0dd18d67d4dfad073a4ecc7f21e46347fd57b01ea46b15591c63a69c043d543fd8bdea3d074ad21862187
|
7
|
+
data.tar.gz: f1cbba992974f48cc0694decb443fd3e16b9465d8bcedc72afb5b6668a42f9e5cde8212e8eafac6dbe1876f074a94604e0681c54fe55c5773804a5631935111e
|
data/ChangeLog.md
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
-
## [v1.
|
3
|
+
## [v1.12.0](https://github.com/fastly/fastly_nsq/tree/v1.12.0)
|
4
4
|
|
5
|
+
[Full Changelog](https://github.com/fastly/fastly_nsq/compare/v1.11.0...v1.12.0)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Add exception handling and logging for listeners [\#89](https://github.com/fastly/fastly_nsq/pull/89) ([leklund](https://github.com/leklund))
|
10
|
+
- Revert "Updates for STDERR and STDOUT redirection when daemonizing." [\#88](https://github.com/fastly/fastly_nsq/pull/88) ([leklund](https://github.com/leklund))
|
11
|
+
|
12
|
+
## [v1.11.0](https://github.com/fastly/fastly_nsq/tree/v1.11.0) (2018-07-25)
|
5
13
|
[Full Changelog](https://github.com/fastly/fastly_nsq/compare/v1.10.1...v1.11.0)
|
6
14
|
|
7
15
|
**Merged pull requests:**
|
data/lib/fastly_nsq/cli.rb
CHANGED
@@ -223,13 +223,11 @@ class FastlyNsq::CLI
|
|
223
223
|
|
224
224
|
reopen(files_to_reopen)
|
225
225
|
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
io.reopen(f)
|
230
|
-
end
|
231
|
-
io.sync = true
|
226
|
+
[$stdout, $stderr].each do |io|
|
227
|
+
File.open(options.fetch(:logfile, '/dev/null'), 'ab') do |f|
|
228
|
+
io.reopen(f)
|
232
229
|
end
|
230
|
+
io.sync = true
|
233
231
|
end
|
234
232
|
$stdin.reopen('/dev/null')
|
235
233
|
|
data/lib/fastly_nsq/feeder.rb
CHANGED
@@ -28,10 +28,20 @@ class FastlyNsq::Feeder
|
|
28
28
|
# When that code is exec'ed +processer.call(message)+ is run. Processor in this context is
|
29
29
|
# a FastlyNsq::Listener
|
30
30
|
#
|
31
|
+
# The block also will log exceptions here because Concurrent::ThreadPoolExecutor will
|
32
|
+
# swallow the exception.
|
33
|
+
#
|
31
34
|
# @param message [Nsq::Message]
|
32
35
|
# @see http://ruby-concurrency.github.io/concurrent-ruby/Concurrent/ThreadPoolExecutor.html#post-instance_method
|
33
36
|
# @see Nsq::Connection#read_loop
|
34
37
|
def push(message)
|
35
|
-
FastlyNsq.manager.pool.post(priority)
|
38
|
+
FastlyNsq.manager.pool.post(priority) do
|
39
|
+
begin
|
40
|
+
processor.call(message)
|
41
|
+
rescue => ex
|
42
|
+
FastlyNsq.logger.error ex
|
43
|
+
raise ex
|
44
|
+
end
|
45
|
+
end
|
36
46
|
end
|
37
47
|
end
|
data/lib/fastly_nsq/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastly_nsq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommy O'Neil
|
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
270
|
rubyforge_project:
|
271
|
-
rubygems_version: 2.
|
271
|
+
rubygems_version: 2.7.3
|
272
272
|
signing_key:
|
273
273
|
specification_version: 4
|
274
274
|
summary: Fastly NSQ Adapter
|