Improved root directory detection.
This commit is contained in:
parent
53a90b6d5c
commit
64c3f6233b
1 changed files with 12 additions and 2 deletions
|
@ -1,8 +1,18 @@
|
||||||
require 'json'
|
require 'json'
|
||||||
|
|
||||||
module Session
|
module Session
|
||||||
@path = Dir.pwd.to_s + '/tmp/websocket'
|
|
||||||
@pid = Dir.pwd.to_s + '/tmp/pids/sessionworker.pid'
|
# get application root directory
|
||||||
|
@root = Dir.pwd.to_s
|
||||||
|
if !@root
|
||||||
|
@root = Rails.root
|
||||||
|
end
|
||||||
|
|
||||||
|
# get working directories
|
||||||
|
@path = @root + '/tmp/websocket'
|
||||||
|
@pid = @root + '/tmp/pids/sessionworker.pid'
|
||||||
|
|
||||||
|
# create global vars for threads
|
||||||
@@user_threads = {}
|
@@user_threads = {}
|
||||||
@@client_threads = {}
|
@@client_threads = {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue