synapse-rails 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
- data/lib/synapse/rails/linker.rb +16 -8
- data/lib/synapse/rails/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: b5fc5e8fc41e615a77b0269e557f28c04171b452
|
4
|
+
data.tar.gz: 2b2331745ba94d08ffba74c2b7e18751d9e08d7e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7677e887a2954a8169811a9b6814dbc17e10242f18aba8cb22472893f8cbc0663a1473665aaca5110c7f23caa776179fffebeb419f59db399fa79428065a485a
|
7
|
+
data.tar.gz: 7aa7458e5a8e60a15614ed667cb21b2a82385832a933c2b3c20178a6a1723392eb634d4c3ad12851aafa0283a8262d6aed75e34ff0fa8b82c9e15837ebc94b95
|
data/lib/synapse/rails/linker.rb
CHANGED
@@ -41,14 +41,22 @@ module Synapse
|
|
41
41
|
synapse_instance.run
|
42
42
|
end
|
43
43
|
at_exit do
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
if File.exists? pid_file_path
|
45
|
+
pids = File.read(pid_file_path).strip
|
46
|
+
cmd = "kill -9 #{pids}"
|
47
|
+
::Rails.logger.info "HAProxy stop #{pids}"
|
48
|
+
`#{cmd}`
|
49
|
+
::Rails.logger.debug "HAProxy unlink #{pid_file_path}"
|
50
|
+
File.unlink pid_file_path
|
51
|
+
end
|
52
|
+
if File.exists? socket_file_path
|
53
|
+
::Rails.logger.debug "HAProxy unlink #{socket_file_path}"
|
54
|
+
File.unlink socket_file_path
|
55
|
+
end
|
56
|
+
if File.exists? config_file_path
|
57
|
+
::Rails.logger.debug "HAProxy unlink #{config_file_path}"
|
58
|
+
File.unlink config_file_path
|
59
|
+
end
|
52
60
|
end
|
53
61
|
wait
|
54
62
|
end
|