cuba-bin 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cuba/bin/daemon.rb +5 -3
- data/lib/cuba/bin/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5471f061b980ac798d6e21b38d1988f2b3854a73
|
4
|
+
data.tar.gz: 84862272e88b6297ce7a210169ceeab576cec453
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5c5850c7bce7d206e3852df9619d9fbe19efa2ad0ec71ae5be9b6514ad6cf74cf0c75dea7a2819763e883c4ecd8d534e73b0d1a01a79a50afeb99dc1a78f0e0
|
7
|
+
data.tar.gz: 47eeffabc1f98deb57459279bd75d288d3808acb91e981b68523fece4693179aa175c4f74030ddad585a78b7eee6f84e5b6b0710a99b8bd831e610bc93cd2fd8
|
data/lib/cuba/bin/daemon.rb
CHANGED
@@ -61,7 +61,6 @@ module Cuba
|
|
61
61
|
|
62
62
|
# TODO maybe consider doing like: http://puma.bogomips.org/SIGNALS.html
|
63
63
|
def reload_everything
|
64
|
-
log 'reloading everything'
|
65
64
|
Process.kill(:QUIT, puma_pid)
|
66
65
|
Process.wait(puma_pid)
|
67
66
|
start_puma
|
@@ -76,12 +75,15 @@ module Cuba
|
|
76
75
|
|
77
76
|
# tell puma to gracefully shut down workers
|
78
77
|
def graceful_restart
|
79
|
-
|
80
|
-
Process.kill(:
|
78
|
+
pid = puma_pid
|
79
|
+
Process.kill(:INT, pid)
|
80
|
+
Process.wait(pid)
|
81
|
+
start_puma
|
81
82
|
end
|
82
83
|
|
83
84
|
def handle_change(modified, added, removed)
|
84
85
|
log "File change event detected: #{{modified: modified, added: added, removed: removed}.inspect}"
|
86
|
+
|
85
87
|
if (modified + added + removed).index {|f| f =~ options[:full]}
|
86
88
|
reload_everything
|
87
89
|
else
|
data/lib/cuba/bin/version.rb
CHANGED