Merge branch 'vrfs192'
This commit is contained in:
commit
bb370a3bb0
1
Gemfile
1
Gemfile
|
|
@ -43,6 +43,7 @@ gem 'sendgrid', '1.1.0'
|
|||
gem 'recaptcha', '0.3.4'
|
||||
gem 'filepicker-rails', '0.0.2'
|
||||
gem 'aws-sdk', '1.8.0'
|
||||
gem 'aasm', '3.0.16'
|
||||
|
||||
#group :libv8 do
|
||||
# gem 'libv8', "~> 3.11.8"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
object @connection
|
||||
|
||||
attributes :ip_address, :client_id
|
||||
attribute :aasm_state => :connection_state
|
||||
|
||||
node(:user_id, :if => lambda { |connection| connection.user.friends?(current_user) }) do |connection|
|
||||
connection.user_id
|
||||
end
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ child(:connections => :participants) {
|
|||
attributes :ip_address, :client_id
|
||||
|
||||
node :user do |connection|
|
||||
{ :id => connection.user.id, :photo_url => connection.user.photo_url, :name => connection.user.name, :is_friend => connection.user.friends?(current_user) }
|
||||
{ :id => connection.user.id, :photo_url => connection.user.photo_url, :name => connection.user.name, :is_friend => connection.user.friends?(current_user), :connection_state => connection.aasm_state }
|
||||
end
|
||||
|
||||
child(:tracks => :tracks) {
|
||||
|
|
|
|||
|
|
@ -88,7 +88,8 @@ module SampleApp
|
|||
|
||||
# Websocket-gateway embedded configs
|
||||
config.websocket_gateway_enable = false
|
||||
config.websocket_gateway_max_stale_connection_time = 1800
|
||||
config.websocket_gateway_connect_time_stale = 30
|
||||
config.websocket_gateway_connect_time_expire = 180
|
||||
config.websocket_gateway_internal_debug = false
|
||||
config.websocket_gateway_port = 6767
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ SampleApp::Application.configure do
|
|||
|
||||
# Websocket-gateway embedded configs
|
||||
config.websocket_gateway_enable = true
|
||||
config.websocket_gateway_max_stale_connection_time = 30
|
||||
config.websocket_gateway_connect_time_stale = 30
|
||||
config.websocket_gateway_connect_time_expire = 180
|
||||
config.websocket_gateway_internal_debug = false
|
||||
config.websocket_gateway_port = 6777
|
||||
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ module JamWebEventMachine
|
|||
end
|
||||
|
||||
def self.die_gracefully_on_signal
|
||||
Rails.logger.debug("*** die_gracefully_on_signal")
|
||||
Signal.trap("INT") { EM.stop }
|
||||
Signal.trap("TERM") { EM.stop }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,5 +2,6 @@ if Rails.application.config.websocket_gateway_enable
|
|||
|
||||
JamWebsockets::Server.new.run :port => Rails.application.config.websocket_gateway_port,
|
||||
:emwebsocket_debug => Rails.application.config.websocket_gateway_internal_debug,
|
||||
:max_stale_connection_time => Rails.application.config.websocket_gateway_max_stale_connection_time
|
||||
end
|
||||
:connect_time_stale => Rails.application.config.websocket_gateway_connect_time_stale,
|
||||
:connect_time_expire => Rails.application.config.websocket_gateway_connect_time_expire
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue