-
Notifications
You must be signed in to change notification settings - Fork 3
Configure pusher
Anurag Tiwari edited this page Aug 11, 2019
·
1 revision
Install Pusher Gem
gem install pusher
# config/transaction.rb
require 'pusher'
PubsubClient = Pusher::Client.new(
app_id:"app_id",
key: "app_key",
secret: "app_secret",
cluster: "cluster_info",
use_tls: true
)
Transaction.configure do |config|
config.redis = Redis.new # defaults to localhost
config.pubsub_client = {client: PubsubClient, trigger: 'trigger', channel_name: 'channel-1', event: 'task'}
end
# config/transaction.rb
require 'pusher'
PubsubClient = Pusher::Client.new(
app_id:"app_id",
key: "app_key",
secret: "app_secret",
cluster: "cluster_info",
use_tls: true
)
Transaction.pubsub_client = {client: PubsubClient, trigger: 'trigger', channel_name: 'channel-1', event: 'task'}