Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>
initializers/message_bus: use the configurated redis host
config/initializers/message_bus.rb | 4 ++++
diff --git a/config/initializers/message_bus.rb b/config/initializers/message_bus.rb index 6b76792a3444b5959e3894af9fd3bacc3e03bac8..fbfe185c083a9a1a20cbe8ea4119978503e5f2c9 100644 --- a/config/initializers/message_bus.rb +++ b/config/initializers/message_bus.rb @@ -2,6 +2,10 @@ MessageBus.user_id_lookup do |env| env['rack.session']['user'] end +# TODO: Should we rig this up with NOOSFERO_CONF? +MessageBus.configure(backend: :redis, url: ENV.fetch("REDIS_HOST", + "redis://localhost:6379/0")) + MessageBus.long_polling_interval = 30 * 1000 MessageBus.max_active_clients = 10_000