smith 0.5.11 → 0.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/smith/agent.rb +4 -8
- data/lib/smith/messaging/amqp_options.rb +5 -5
- data/lib/smith/version.rb +1 -1
- data/lib/smith.rb +2 -3
- metadata +29 -29
data/lib/smith/agent.rb
CHANGED
|
@@ -157,9 +157,9 @@ module Smith
|
|
|
157
157
|
p.state = 'acknowledge_start'
|
|
158
158
|
p.pid = $$
|
|
159
159
|
p.name = self.class.to_s
|
|
160
|
-
p.metadata =
|
|
161
|
-
p.monitor =
|
|
162
|
-
p.singleton =
|
|
160
|
+
p.metadata = Smith.config.agent.metadata
|
|
161
|
+
p.monitor = Smith.config.agent.monitor
|
|
162
|
+
p.singleton = Smith.config.agent.singleton
|
|
163
163
|
p.started_at = Time.now.to_i
|
|
164
164
|
end
|
|
165
165
|
ack_start_queue.publish(payload)
|
|
@@ -174,7 +174,7 @@ module Smith
|
|
|
174
174
|
end
|
|
175
175
|
|
|
176
176
|
def start_keep_alive
|
|
177
|
-
if
|
|
177
|
+
if Smith.config.agent.monitor
|
|
178
178
|
EventMachine::add_periodic_timer(1) do
|
|
179
179
|
sender('agent.keepalive', :auto_delete => false, :durable => false, :dont_cache => true) do |keep_alive_queue|
|
|
180
180
|
message = {:name => self.class.to_s, :pid => $$, :time => Time.now.to_i}
|
|
@@ -192,10 +192,6 @@ module Smith
|
|
|
192
192
|
@factory
|
|
193
193
|
end
|
|
194
194
|
|
|
195
|
-
def agent_options
|
|
196
|
-
Smith.config.agent._child
|
|
197
|
-
end
|
|
198
|
-
|
|
199
195
|
def control_queue_name
|
|
200
196
|
"#{default_queue_name}.control"
|
|
201
197
|
end
|
|
@@ -12,23 +12,23 @@ module Smith
|
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def exchange(*extra_opts)
|
|
15
|
-
merge(Smith.config.amqp.exchange.
|
|
15
|
+
merge(Smith.config.amqp.exchange.to_hash, @options, extra_opts)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
def queue(*extra_opts)
|
|
19
|
-
merge(Smith.config.amqp.queue.
|
|
19
|
+
merge(Smith.config.amqp.queue.to_hash, @options, extra_opts)
|
|
20
20
|
end
|
|
21
21
|
|
|
22
22
|
def pop(*extra_opts)
|
|
23
|
-
merge(Smith.config.amqp.pop.
|
|
23
|
+
merge(Smith.config.amqp.pop.to_hash, @options, extra_opts)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def publish(*extra_opts)
|
|
27
|
-
merge(Smith.config.amqp.publish.
|
|
27
|
+
merge(Smith.config.amqp.publish.to_hash, {:routing_key => queue_name}, extra_opts)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def subscribe(*extra_opts)
|
|
31
|
-
merge(Smith.config.amqp.subscribe.
|
|
31
|
+
merge(Smith.config.amqp.subscribe.to_hash, extra_opts)
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
private
|
data/lib/smith/version.rb
CHANGED
data/lib/smith.rb
CHANGED
|
@@ -97,10 +97,9 @@ module Smith
|
|
|
97
97
|
EM.kqueue if EM.kqueue?
|
|
98
98
|
EM.set_descriptor_table_size(opts[:fdsize] || 1024)
|
|
99
99
|
|
|
100
|
-
connection_settings = config.amqp.broker.
|
|
100
|
+
connection_settings = config.amqp.broker._merge(
|
|
101
101
|
:on_tcp_connection_failure => method(:tcp_connection_failure_handler),
|
|
102
|
-
:on_possible_authentication_failure => method(:authentication_failure_handler)
|
|
103
|
-
})
|
|
102
|
+
:on_possible_authentication_failure => method(:authentication_failure_handler))
|
|
104
103
|
|
|
105
104
|
AMQP.start(connection_settings) do |connection|
|
|
106
105
|
@connection = connection
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: smith
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.12
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,24 +9,24 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-12-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: amqp
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
|
-
- - '
|
|
19
|
+
- - ! '>='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: 0.9.
|
|
21
|
+
version: 0.9.8
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
none: false
|
|
26
26
|
requirements:
|
|
27
|
-
- - '
|
|
27
|
+
- - ! '>='
|
|
28
28
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: 0.9.
|
|
29
|
+
version: 0.9.8
|
|
30
30
|
- !ruby/object:Gem::Dependency
|
|
31
31
|
name: dm-core
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -144,17 +144,17 @@ dependencies:
|
|
|
144
144
|
requirement: !ruby/object:Gem::Requirement
|
|
145
145
|
none: false
|
|
146
146
|
requirements:
|
|
147
|
-
- -
|
|
147
|
+
- - '='
|
|
148
148
|
- !ruby/object:Gem::Version
|
|
149
|
-
version: 3.1
|
|
149
|
+
version: 3.3.1
|
|
150
150
|
type: :runtime
|
|
151
151
|
prerelease: false
|
|
152
152
|
version_requirements: !ruby/object:Gem::Requirement
|
|
153
153
|
none: false
|
|
154
154
|
requirements:
|
|
155
|
-
- -
|
|
155
|
+
- - '='
|
|
156
156
|
- !ruby/object:Gem::Version
|
|
157
|
-
version: 3.1
|
|
157
|
+
version: 3.3.1
|
|
158
158
|
- !ruby/object:Gem::Dependency
|
|
159
159
|
name: ruby_protobuf
|
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -245,18 +245,8 @@ extra_rdoc_files: []
|
|
|
245
245
|
files:
|
|
246
246
|
- bin/agency
|
|
247
247
|
- bin/smithctl
|
|
248
|
-
- lib/smith.rb
|
|
249
|
-
- lib/smith/acl_compiler.rb
|
|
250
|
-
- lib/smith/agent.rb
|
|
251
|
-
- lib/smith/agent_cache.rb
|
|
252
248
|
- lib/smith/agent_config.rb
|
|
253
|
-
- lib/smith/agent_monitoring.rb
|
|
254
|
-
- lib/smith/agent_process.rb
|
|
255
249
|
- lib/smith/application/agency.rb
|
|
256
|
-
- lib/smith/bootstrap.rb
|
|
257
|
-
- lib/smith/cache.rb
|
|
258
|
-
- lib/smith/command.rb
|
|
259
|
-
- lib/smith/command_base.rb
|
|
260
250
|
- lib/smith/commands/agency/agents.rb
|
|
261
251
|
- lib/smith/commands/agency/kill.rb
|
|
262
252
|
- lib/smith/commands/agency/list.rb
|
|
@@ -267,7 +257,6 @@ files:
|
|
|
267
257
|
- lib/smith/commands/agency/start.rb
|
|
268
258
|
- lib/smith/commands/agency/stop.rb
|
|
269
259
|
- lib/smith/commands/agency/version.rb
|
|
270
|
-
- lib/smith/commands/common.rb
|
|
271
260
|
- lib/smith/commands/smithctl/acl.rb
|
|
272
261
|
- lib/smith/commands/smithctl/commands.rb
|
|
273
262
|
- lib/smith/commands/smithctl/pop.rb
|
|
@@ -275,28 +264,39 @@ files:
|
|
|
275
264
|
- lib/smith/commands/smithctl/rm.rb
|
|
276
265
|
- lib/smith/commands/smithctl/top.rb
|
|
277
266
|
- lib/smith/commands/template.rb
|
|
278
|
-
- lib/smith/
|
|
279
|
-
- lib/smith/daemon.rb
|
|
280
|
-
- lib/smith/exceptions.rb
|
|
281
|
-
- lib/smith/logger.rb
|
|
282
|
-
- lib/smith/messaging/acl/agency_command.proto
|
|
267
|
+
- lib/smith/commands/common.rb
|
|
283
268
|
- lib/smith/messaging/acl/agent_command.proto
|
|
284
269
|
- lib/smith/messaging/acl/agent_config_request.proto
|
|
285
270
|
- lib/smith/messaging/acl/agent_config_update.proto
|
|
271
|
+
- lib/smith/messaging/acl/search.proto
|
|
272
|
+
- lib/smith/messaging/acl/agency_command.proto
|
|
286
273
|
- lib/smith/messaging/acl/agent_keepalive.proto
|
|
287
274
|
- lib/smith/messaging/acl/agent_lifecycle.proto
|
|
288
275
|
- lib/smith/messaging/acl/agent_stats.proto
|
|
289
276
|
- lib/smith/messaging/acl/default.rb
|
|
290
|
-
- lib/smith/messaging/
|
|
277
|
+
- lib/smith/messaging/responder.rb
|
|
291
278
|
- lib/smith/messaging/amqp_options.rb
|
|
292
279
|
- lib/smith/messaging/endpoint.rb
|
|
293
280
|
- lib/smith/messaging/payload.rb
|
|
294
281
|
- lib/smith/messaging/queue_factory.rb
|
|
295
282
|
- lib/smith/messaging/receiver.rb
|
|
296
|
-
- lib/smith/messaging/responder.rb
|
|
297
283
|
- lib/smith/messaging/sender.rb
|
|
298
284
|
- lib/smith/object_count.rb
|
|
299
285
|
- lib/smith/version.rb
|
|
286
|
+
- lib/smith/acl_compiler.rb
|
|
287
|
+
- lib/smith/agent.rb
|
|
288
|
+
- lib/smith/agent_cache.rb
|
|
289
|
+
- lib/smith/agent_monitoring.rb
|
|
290
|
+
- lib/smith/agent_process.rb
|
|
291
|
+
- lib/smith/bootstrap.rb
|
|
292
|
+
- lib/smith/cache.rb
|
|
293
|
+
- lib/smith/command.rb
|
|
294
|
+
- lib/smith/command_base.rb
|
|
295
|
+
- lib/smith/config.rb
|
|
296
|
+
- lib/smith/daemon.rb
|
|
297
|
+
- lib/smith/exceptions.rb
|
|
298
|
+
- lib/smith/logger.rb
|
|
299
|
+
- lib/smith.rb
|
|
300
300
|
homepage: http://github.com/filterfish/smith2/
|
|
301
301
|
licenses: []
|
|
302
302
|
post_install_message:
|
|
@@ -316,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
316
316
|
- !ruby/object:Gem::Version
|
|
317
317
|
version: '0'
|
|
318
318
|
requirements: []
|
|
319
|
-
rubyforge_project:
|
|
319
|
+
rubyforge_project: smith
|
|
320
320
|
rubygems_version: 1.8.24
|
|
321
321
|
signing_key:
|
|
322
322
|
specification_version: 3
|