abstract out faye

This commit is contained in:
2012-11-29 11:32:22 +01:00
parent 0fa0d1e0ba
commit b9c0ca326b
11 changed files with 25 additions and 18 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
require 'faye'
#require File.expand_path('../config/initializers/faye_token.rb', __FILE__)
setproctitle('qwaiter_faye') if respond_to?(:setproctitle)
class ServerAuth
def incoming(message, callback)
if message['channel'] !~ %r{^/meta/}
@@ -13,6 +13,6 @@ class ServerAuth
end
faye_server = Faye::RackAdapter.new(mount: '/faye', timeout: 45)
faye_server.listen 9292
faye_server.listen 9296
faye_server.add_extension(ServerAuth.new)
run faye_server