daemontools 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/daemontools.rb +10 -0
- data/lib/daemontools/capistrano.rb +1 -1
- data/lib/daemontools/version.rb +1 -1
- metadata +3 -3
data/lib/daemontools.rb
CHANGED
@@ -59,6 +59,16 @@ module Daemontools
|
|
59
59
|
Dir.mkdir("#{@path}/log") unless Dir.exists?("#{@path}/log")
|
60
60
|
File.open("#{@path}/log/run", 'w', 0755) {|f| f.write(run_template('log.erb'))}
|
61
61
|
File.open("#{@path}/run", 'w', 0755) {|f| f.write(run_template('run.erb'))}
|
62
|
+
|
63
|
+
unless options[:not_wait]
|
64
|
+
wait_timeout = options[:wait_timeout] || 10
|
65
|
+
now = Time.now.to_f
|
66
|
+
while `sudo svstat #{@path} 2>&1`.match(/unable to open/i)
|
67
|
+
raise "Timeout wait for svc add service" if Time.now.to_f - now > wait_timeout
|
68
|
+
sleep 0.1
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
62
72
|
true
|
63
73
|
end
|
64
74
|
|
@@ -19,7 +19,7 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
19
19
|
path = fetch(:release_path)
|
20
20
|
|
21
21
|
servers.each do |server, roles|
|
22
|
-
command = "cd #{path} && daemontools-gen #{fetch :rails_env, "production"} #{roles.join(',')}"
|
22
|
+
command = "cd #{path} && bundle exec daemontools-gen #{fetch :rails_env, "production"} #{roles.join(',')}"
|
23
23
|
run command
|
24
24
|
end
|
25
25
|
end
|
data/lib/daemontools/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daemontools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -78,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: '0'
|
79
79
|
segments:
|
80
80
|
- 0
|
81
|
-
hash: -
|
81
|
+
hash: -1763031162701123507
|
82
82
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
@@ -87,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
87
87
|
version: '0'
|
88
88
|
segments:
|
89
89
|
- 0
|
90
|
-
hash: -
|
90
|
+
hash: -1763031162701123507
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
93
|
rubygems_version: 1.8.24
|