magellan-rails 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7994198ac677aac97cb9cd7607af3e1555f6835
4
- data.tar.gz: 5aba22c79480da7e3e9725914069a0f4e05c9256
3
+ metadata.gz: 6706307cbe21a27f1832224f133c9be0ffeecdc9
4
+ data.tar.gz: 47b485f711ff3ccc50c12ac1addc4dfa7c91b2bb
5
5
  SHA512:
6
- metadata.gz: 0e16ac47ff948dbfbc28cb27d74d64e158aa89ecc7582638c180a7f1c21eab794e0dfd72d789e07a05e127e04349e71307192390399cab5e31b755ccee9191f0
7
- data.tar.gz: e5d9df628af9e34942993fe8c344b42f0be2409cf3e57423477f42a544078e5fe2eb06ff8e09ad619656060737f6c04f47e4a01cf969509a4b5b7d64eec83612
6
+ metadata.gz: fcc1ae698ce093c7a3291c1f9a7a57a1942bb7c18de245e9b2cd160e953fe4ed2dac2e707ceb8b25617f63a3243e21f276c3c9bad6e3938c63cb8598ca0fac57
7
+ data.tar.gz: fabe5901b184d052f23728b889fe8a595edfc923d21e406902fc7e25c7b45285d22bb6d274cf679fe48bf8f6f29c30f2b7efe57c3e0079c86c512478d46490e6
@@ -1,5 +1,5 @@
1
1
  module Magellan
2
2
  module Rails
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -45,6 +45,11 @@ class Magellan::Worker::Core
45
45
  end
46
46
 
47
47
  def run
48
+ # handle SIGTERM from `docker stop`
49
+ Signal.trap(:TERM) do
50
+ @channel.work_pool.shutdown
51
+ end
52
+
48
53
  Magellan.logger.info("====== Magellan Worker start ======")
49
54
  @queue.subscribe(block: true, manual_ack: true) do |delivery_info, properties, payload|
50
55
  reply_to = properties.reply_to # ワーカー実行結果返却時のルーティングキー
@@ -66,5 +71,6 @@ class Magellan::Worker::Core
66
71
  Magellan.logger.error("Magellan Worker request execution error: #{$!}\n" + $@.join("\n"))
67
72
  end
68
73
  end
74
+ Magellan.logger.info("====== Magellan Worker finished ======")
69
75
  end
70
76
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: magellan-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuuki Noguchi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-11 00:00:00.000000000 Z
11
+ date: 2014-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  requirements: []
154
154
  rubyforge_project:
155
- rubygems_version: 2.2.2
155
+ rubygems_version: 2.4.5
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: ''