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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eeed9cfb21f7e2b9137de8b0547b5e3ef9c3fcd7
4
- data.tar.gz: 7a7e19b153006feabe385309c5170f1d25bc1c7f
3
+ metadata.gz: b5fc5e8fc41e615a77b0269e557f28c04171b452
4
+ data.tar.gz: 2b2331745ba94d08ffba74c2b7e18751d9e08d7e
5
5
  SHA512:
6
- metadata.gz: 911e325f0d0a0a661891ca37b8a23754826e1df3ef0011590459b1d612e0460953a8a11b784629590b7f1580c4d16476259fc3fb423c8c7ed1398d45fdb37986
7
- data.tar.gz: b0a4f753b279804616ac42c2edda95ed6fbd51829f231e75c363c1dc41906210ca93c7fbe6535a39a6de1fc409e91c733234a5f904bd3b8d2a6d6bd8dbc709e4
6
+ metadata.gz: 7677e887a2954a8169811a9b6814dbc17e10242f18aba8cb22472893f8cbc0663a1473665aaca5110c7f23caa776179fffebeb419f59db399fa79428065a485a
7
+ data.tar.gz: 7aa7458e5a8e60a15614ed667cb21b2a82385832a933c2b3c20178a6a1723392eb634d4c3ad12851aafa0283a8262d6aed75e34ff0fa8b82c9e15837ebc94b95
@@ -41,14 +41,22 @@ module Synapse
41
41
  synapse_instance.run
42
42
  end
43
43
  at_exit do
44
- puts "Stopping HAProxy"
45
- `cat #{pid_file_path} | xargs kill -9` if File.exists? pid_file_path
46
- puts "Remove PID-File"
47
- File.unlink pid_file_path if File.exists? pid_file_path
48
- puts "Remove Socket-File"
49
- File.unlink socket_file_path if File.exists? socket_file_path
50
- puts "Remove Config-File"
51
- File.unlink config_file_path if File.exists? config_file_path
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
@@ -1,5 +1,5 @@
1
1
  module Synapse
2
2
  module Rails
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synapse-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathias Kaufmann