dango 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dango/server_framework.rb +5 -3
- data/lib/dango/version.rb +1 -1
- metadata +2 -2
@@ -31,6 +31,7 @@ class DangoServerFramework
|
|
31
31
|
DefaultLogMaxSize = 1048576
|
32
32
|
DefaultLogShiftAge = 99
|
33
33
|
DefaultGServerLogFile = ""
|
34
|
+
DefaultPidFile = "tmp/pids/dango.#{RAILS_ENV}.pid"
|
34
35
|
|
35
36
|
# ここから先は普通は変更しなくていいだろうというもの
|
36
37
|
SendReceiveSleepIntervalSec = 0.2 # データ送信時の送信間隔秒
|
@@ -104,9 +105,9 @@ class DangoServerFramework
|
|
104
105
|
def exit_process() # プロセス終了処理
|
105
106
|
debug_print("shutdown")
|
106
107
|
begin
|
107
|
-
File.delete(
|
108
|
+
File.delete(@pid_file)
|
108
109
|
rescue
|
109
|
-
# puts "failed delete file.
|
110
|
+
# puts "failed delete file. #{@pid_file}:#{$!.class}:#{$!.message}"
|
110
111
|
end
|
111
112
|
puts "shutdown"
|
112
113
|
exit!
|
@@ -198,7 +199,7 @@ class DangoServerFramework
|
|
198
199
|
|
199
200
|
GC.disable
|
200
201
|
|
201
|
-
open(
|
202
|
+
open(@pid_file, "wb"){|fh| fh.write Process.pid.to_s } # pidをファイルに保存
|
202
203
|
|
203
204
|
begin
|
204
205
|
@gserver.start
|
@@ -505,6 +506,7 @@ EOF
|
|
505
506
|
@log_max_size = @config['server']['log_max_size'] || DefaultLogMaxSize
|
506
507
|
@log_shift_age = @config['server']['log_shift_age'] || DefaultLogShiftAge
|
507
508
|
@gserver_log_file = @config['server']['gserver_log_file'] || DefaultGServerLogFile
|
509
|
+
@pid_file = @config['server']['pid_file'] || DefaultPidFile
|
508
510
|
|
509
511
|
@send_receive_sleep_interval_sec = @config['server']['send_receive_sleep_interval_sec'] || SendReceiveSleepIntervalSec
|
510
512
|
@send_receive_timeout_default_sec = @config['server']['send_receive_timeout_default_sec'] || SendReceiveTimeoutDefaultSec
|
data/lib/dango/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dango
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keisuke Minami
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-06-
|
12
|
+
date: 2008-06-20 00:00:00 +09:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|