ffwd 0.2.3 → 0.2.4

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: 3ab8188ceb50b7d6c8d0843c0d41cc15e2bdb2e9
4
- data.tar.gz: ded99314a2159032e871f0426646c29960438d12
3
+ metadata.gz: c295242d5e946456b427bee9e90460f9ec0dd071
4
+ data.tar.gz: dc6f89b142d7f5446a01682e347e784ef1641f58
5
5
  SHA512:
6
- metadata.gz: c875d87b096ae71a0f645d63bcf2b8ec77940201aad9325b0dc432735ae83701bfba40a00ee4bc44828e479556027af49deb272a441959cfd3c399c4f49e9104
7
- data.tar.gz: 6060dbbe25cab2e52ddc6fa67cb2b754955a936d42f28bdcf3210b2695e567b173b66be29f4b0b8837570d2249ee57619fc0c662d3f1a2c8274307eb63fdc43e
6
+ metadata.gz: 118a3cadbe8cb5530a869184f55e3787d3247a7a37b34bcb11be05e6dcd45c39505ffa214018a3e9e858c589ce7affa3e102b99e4aa316bfd23ad243a8b37887
7
+ data.tar.gz: 237ca9680135e557dc107ae47774c55e798a1b0fc4ac351ec3efdb8f3b06b1378239a92d7c41e88b3244333af3528d6d3e919bcb56ef7b171ad3aff67fbd30c7
@@ -15,13 +15,10 @@
15
15
 
16
16
  require 'eventmachine'
17
17
 
18
- require 'ffwd/logging'
19
18
  require 'ffwd/connection'
20
19
 
21
20
  module FFWD::Plugin::JSON
22
21
  class Connection < FFWD::Connection
23
- include FFWD::Logging
24
-
25
22
  EVENT_FIELDS = [
26
23
  ["key", :key],
27
24
  ["value", :value],
@@ -50,8 +47,7 @@ module FFWD::Plugin::JSON
50
47
  data = JSON.load(data)
51
48
 
52
49
  unless type = data["type"]
53
- log.error "Field 'type' missing from received line"
54
- return
50
+ raise "Field 'type' missing from received line"
55
51
  end
56
52
 
57
53
  if type == "metric"
@@ -66,9 +62,7 @@ module FFWD::Plugin::JSON
66
62
  return
67
63
  end
68
64
 
69
- log.error "No such type: #{type}"
70
- rescue => e
71
- log.error "Failed to receive line", e
65
+ raise "No such type: #{type}"
72
66
  end
73
67
 
74
68
  def read_tags d, source
@@ -51,6 +51,7 @@ module FFWD::Plugin::JSON
51
51
  ]
52
52
 
53
53
  class LineConnection < FFWD::Plugin::JSON::Connection
54
+ include FFWD::Logging
54
55
  include EM::Protocols::LineText2
55
56
 
56
57
  def self.plugin_type
@@ -59,16 +60,22 @@ module FFWD::Plugin::JSON
59
60
 
60
61
  def receive_line data
61
62
  receive_json data
63
+ rescue => e
64
+ log.error "Failed to receive JSON: #{data.inspect}: #{e}"
62
65
  end
63
66
  end
64
67
 
65
68
  class FrameConnection < FFWD::Plugin::JSON::Connection
69
+ include FFWD::Logging
70
+
66
71
  def self.plugin_type
67
72
  "json_frame_in"
68
73
  end
69
74
 
70
75
  def receive_data data
71
76
  receive_json data
77
+ rescue => e
78
+ log.error "Failed to receive JSON: #{data.inspect}: #{e}"
72
79
  end
73
80
  end
74
81
 
@@ -58,6 +58,7 @@ module FFWD::UDP
58
58
 
59
59
  if size = config[:receive_buffer_size]
60
60
  log.debug "Setting receive buffer size to #{size}"
61
+ @socket.set_sock_opt Socket::SOL_SOCKET, Socket::SO_RCVBUFFORCE, true
61
62
  @socket.set_sock_opt Socket::SOL_SOCKET, Socket::SO_RCVBUF, size
62
63
  end
63
64
 
data/lib/ffwd/version.rb CHANGED
@@ -14,5 +14,5 @@
14
14
  # the License.
15
15
 
16
16
  module FFWD
17
- VERSION = "0.2.3"
17
+ VERSION = "0.2.4"
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffwd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John-John Tedro
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-17 00:00:00.000000000 Z
12
+ date: 2014-08-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  requirements: []
157
157
  rubyforge_project:
158
- rubygems_version: 2.0.3
158
+ rubygems_version: 2.0.14
159
159
  signing_key:
160
160
  specification_version: 4
161
161
  summary: Core framework for the FastForward Daemon.