celluloid_pubsub 0.7.6 → 0.7.7
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.
- checksums.yaml +4 -4
- data/lib/celluloid_pubsub/reactor.rb +3 -3
- data/lib/celluloid_pubsub/version.rb +1 -1
- data/lib/celluloid_pubsub.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64037f395a37be9150986b326ee3f3105b2ff9bf
|
4
|
+
data.tar.gz: c01714037f344763829781654ca80f9eb9367f81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 916f2f5f88590df0946934257acf6604cc4ef803d2240f737509013abeffb153ab551ff0ad08706afec251c643fd4bfd3d57ebc28bcbce9636ebeb5b32c9bd60
|
7
|
+
data.tar.gz: 0b8578cf7055b3f196f91e38e5607b9698d6a0f98735d480463b696a687a4dd9d846fc66efea9aadddad04a957fb92263856f6714b587c11e1027bdd83011a03
|
@@ -308,7 +308,7 @@ module CelluloidPubsub
|
|
308
308
|
# @api public
|
309
309
|
def publish_event(current_topic, message)
|
310
310
|
return if current_topic.blank? || message.blank?
|
311
|
-
(@server.subscribers[current_topic].dup || []).
|
311
|
+
(@server.subscribers[current_topic].dup || []).pmap do |hash|
|
312
312
|
hash[:reactor].websocket << message
|
313
313
|
end
|
314
314
|
rescue => exception
|
@@ -322,7 +322,7 @@ module CelluloidPubsub
|
|
322
322
|
# @api public
|
323
323
|
def unsubscribe_all
|
324
324
|
log_debug "#{self.class} runs 'unsubscribe_all' method"
|
325
|
-
CelluloidPubsub::Registry.channels.dup.
|
325
|
+
CelluloidPubsub::Registry.channels.dup.pmap do |channel|
|
326
326
|
unsubscribe_clients(channel)
|
327
327
|
end
|
328
328
|
log_debug 'clearing connections'
|
@@ -337,7 +337,7 @@ module CelluloidPubsub
|
|
337
337
|
# @api public
|
338
338
|
def unsubscribe_from_channel(channel)
|
339
339
|
log_debug "#{self.class} runs 'unsubscribe_from_channel' method with #{channel}"
|
340
|
-
(@server.subscribers[channel].dup || []).
|
340
|
+
(@server.subscribers[channel].dup || []).pmap do |hash|
|
341
341
|
reactor = hash[:reactor]
|
342
342
|
reactor.websocket.close
|
343
343
|
Celluloid::Actor.kill(reactor)
|
data/lib/celluloid_pubsub.rb
CHANGED
@@ -6,6 +6,7 @@ require 'reel'
|
|
6
6
|
require 'celluloid/websocket/client'
|
7
7
|
require 'active_support/all'
|
8
8
|
require 'json'
|
9
|
+
require 'celluloid/pmap'
|
9
10
|
require 'celluloid_pubsub/base_actor'
|
10
11
|
Gem.find_files('celluloid_pubsub/initializers/**/*.rb').each { |path| require path }
|
11
12
|
Gem.find_files('celluloid_pubsub/**/*.rb').each { |path| require path }
|