infopark-politics 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/politics/static_queue_worker.rb +3 -2
- metadata +1 -1
@@ -214,7 +214,8 @@ module Politics
|
|
214
214
|
def find_workers
|
215
215
|
workers = []
|
216
216
|
browser = Net::DNS::MDNSSD.browse(mdns_type) do |reply|
|
217
|
-
|
217
|
+
worker_uri = reply.name.gsub(/#/, '.')
|
218
|
+
workers << worker_uri unless worker_uri == uri
|
218
219
|
end
|
219
220
|
sleep 5
|
220
221
|
browser.stop
|
@@ -332,7 +333,7 @@ module Politics
|
|
332
333
|
@port = URI.parse(DRb.uri).port
|
333
334
|
|
334
335
|
# Register our DRb server with Bonjour.
|
335
|
-
name = @uri
|
336
|
+
name = @uri.gsub(/\./, '#')
|
336
337
|
domain = "local"
|
337
338
|
log.debug "register service #{name} of type #{mdns_type} within domain #{domain} at port #{@port}"
|
338
339
|
handle = Net::DNS::MDNSSD.register(name, mdns_type, domain, @port) do |reply|
|