lib/metacosm/simulation.rb in metacosm-0.3.5 vs lib/metacosm/simulation.rb in metacosm-0.3.6

- old
+ new

@@ -70,11 +70,11 @@ @on_event_callback[event_dto] end if !@event_publication_channel.nil? event_dto = event.attrs.merge(listener_module: event.listener_module_name, listener_class_name: event.listener_class_name) - REDIS.with do |redis| + REDIS_PUB.with do |redis| redis.publish(@event_publication_channel, Marshal.dump(event_dto)) end end if !local_events_disabled? @@ -98,10 +98,10 @@ end def subscribe_for_commands(channel:) p [ :subscribe_to_command_channel, channel: channel ] @command_subscription_thread = Thread.new do - REDIS.with do |redis| + REDIS_SUB.with do |redis| begin redis.subscribe(channel) do |on| on.subscribe do |chan, subscriptions| puts "Subscribed to ##{chan} (#{subscriptions} subscriptions)" end