pushapp 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pushapp/generators.rb +1 -1
- data/lib/pushapp/version.rb +1 -1
- data/templates/unicorn_upstart.erb +17 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98a8bbfa81a6ec450adb340f2d5c8210b265ed4b
|
4
|
+
data.tar.gz: c188d207ccc5b569cb5c46a239679e38ee24e8c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03bb4b8fbd3fe162315affabdb4aa6b18c3249b2ed9bc4579384fc782e9224dfcb15ed9efdd00bca05a3bb022a613d8831b5e4ccab0e6582d54f61784979e3c1
|
7
|
+
data.tar.gz: df2a3f65d229521cf013be4a56f37eadde3893fec76d6783781f5ce86120b1c4a688ee6fc262d3a5e2098fc5cc93cb0ab07a1ba2b32eb5eeb8c2b4f1cc75ac7c
|
data/lib/pushapp/generators.rb
CHANGED
@@ -49,7 +49,7 @@ module Pushapp
|
|
49
49
|
template 'unicorn.rb.erb', 'config/unicorn.rb'
|
50
50
|
end
|
51
51
|
|
52
|
-
desc 'chef-
|
52
|
+
desc 'chef-solo REMOTE', 'generates chef solo with knife solo configs'
|
53
53
|
method_option :database,
|
54
54
|
type: :string,
|
55
55
|
default: 'postgresql',
|
data/lib/pushapp/version.rb
CHANGED
@@ -1,13 +1,23 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
unicorn_pid_file=tmp/pids/unicorn.pid
|
4
|
+
|
5
|
+
if [ -f $unicorn_pid_file ]; then
|
5
6
|
# Someone restarted the master; wait for the new master to exit.
|
6
|
-
PID=`cat $unicorn_pid_file`
|
7
7
|
|
8
|
-
|
8
|
+
function graceful_shutdown {
|
9
|
+
echo "Initializing graceful shutdown"
|
10
|
+
kill -QUIT `cat $unicorn_pid_file`
|
11
|
+
|
12
|
+
# Git unicorn some time to stop
|
13
|
+
sleep 1
|
14
|
+
}
|
15
|
+
|
16
|
+
# Trap upstart stop (TERM) and send QUIT to unicorn
|
17
|
+
trap graceful_shutdown TERM
|
18
|
+
|
19
|
+
while [ -f $unicorn_pid_file ] && kill -0 `cat $unicorn_pid_file`; do
|
9
20
|
sleep 2
|
10
|
-
PID=`cat $unicorn_pid_file`
|
11
21
|
done
|
12
22
|
|
13
23
|
# If we get here, the master has exited, either because someone restarted
|
@@ -16,8 +26,8 @@ if [ -f tmp/pids/unicorn.pid ]; then
|
|
16
26
|
# The sleep above is a tradeoff between polling load and mimizing the
|
17
27
|
# restart delay when the master dies for real (which should hopefully be
|
18
28
|
# rare).
|
19
|
-
rm $unicorn_pid_file
|
29
|
+
rm -f $unicorn_pid_file
|
20
30
|
else
|
21
31
|
# Run the unicorn master process (this won't return until it exits).
|
22
|
-
bundle exec unicorn -E $RAILS_ENV -c config/unicorn.rb
|
32
|
+
exec bundle exec unicorn -E $RAILS_ENV -c config/unicorn.rb
|
23
33
|
fi
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pushapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yury Korolev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|