rightscale-nanite 0.4.1.3 → 0.4.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nanite.rb +1 -1
- data/lib/nanite/packets.rb +11 -11
- metadata +1 -1
data/lib/nanite.rb
CHANGED
@@ -39,7 +39,7 @@ require 'nanite/security/static_certificate_store'
|
|
39
39
|
require 'nanite/serializer'
|
40
40
|
|
41
41
|
module Nanite
|
42
|
-
VERSION = '0.4.1.
|
42
|
+
VERSION = '0.4.1.4' unless defined?(Nanite::VERSION)
|
43
43
|
|
44
44
|
class MapperNotRunning < StandardError; end
|
45
45
|
|
data/lib/nanite/packets.rb
CHANGED
@@ -89,7 +89,7 @@ module Nanite
|
|
89
89
|
|
90
90
|
attr_accessor :chunk, :token
|
91
91
|
|
92
|
-
def initialize(token,
|
92
|
+
def initialize(token, chunk=nil, size=nil)
|
93
93
|
@chunk = chunk
|
94
94
|
@token = token
|
95
95
|
@size = size
|
@@ -97,7 +97,7 @@ module Nanite
|
|
97
97
|
|
98
98
|
def self.json_create(o)
|
99
99
|
i = o['data']
|
100
|
-
new(i['token'],
|
100
|
+
new(i['token'], i['chunk'], o['size'])
|
101
101
|
end
|
102
102
|
|
103
103
|
def to_s
|
@@ -124,7 +124,7 @@ module Nanite
|
|
124
124
|
|
125
125
|
DEFAULT_OPTIONS = {:selector => :least_loaded}
|
126
126
|
|
127
|
-
def initialize(type, payload,
|
127
|
+
def initialize(type, payload, opts={}, size=nil)
|
128
128
|
opts = DEFAULT_OPTIONS.merge(opts)
|
129
129
|
@type = type
|
130
130
|
@payload = payload
|
@@ -140,10 +140,10 @@ module Nanite
|
|
140
140
|
|
141
141
|
def self.json_create(o)
|
142
142
|
i = o['data']
|
143
|
-
new(i['type'], i['payload'],
|
144
|
-
|
145
|
-
|
146
|
-
|
143
|
+
new(i['type'], i['payload'], { :from => i['from'], :token => i['token'],
|
144
|
+
:reply_to => i['reply_to'], :selector => i['selector'],
|
145
|
+
:target => i['target'], :persistent => i['persistent'],
|
146
|
+
:tags => i['tags'] }, o['size'])
|
147
147
|
end
|
148
148
|
|
149
149
|
def to_s(filter=nil)
|
@@ -176,7 +176,7 @@ module Nanite
|
|
176
176
|
|
177
177
|
DEFAULT_OPTIONS = {:selector => :least_loaded}
|
178
178
|
|
179
|
-
def initialize(type, payload,
|
179
|
+
def initialize(type, payload, opts={}, size=nil)
|
180
180
|
opts = DEFAULT_OPTIONS.merge(opts)
|
181
181
|
@type = type
|
182
182
|
@payload = payload
|
@@ -191,9 +191,9 @@ module Nanite
|
|
191
191
|
|
192
192
|
def self.json_create(o)
|
193
193
|
i = o['data']
|
194
|
-
new(i['type'], i['payload'],
|
195
|
-
|
196
|
-
|
194
|
+
new(i['type'], i['payload'], { :from => i['from'], :token => i['token'],
|
195
|
+
:selector => i['selector'], :target => i['target'],
|
196
|
+
:persistent => i['persistent'], :tags => i['tags'] }, o['size'])
|
197
197
|
end
|
198
198
|
|
199
199
|
def to_s(filter=nil)
|