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 +4 -4
- data/lib/magellan/rails/version.rb +1 -1
- data/lib/magellan/worker/core.rb +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6706307cbe21a27f1832224f133c9be0ffeecdc9
|
4
|
+
data.tar.gz: 47b485f711ff3ccc50c12ac1addc4dfa7c91b2bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcc1ae698ce093c7a3291c1f9a7a57a1942bb7c18de245e9b2cd160e953fe4ed2dac2e707ceb8b25617f63a3243e21f276c3c9bad6e3938c63cb8598ca0fac57
|
7
|
+
data.tar.gz: fabe5901b184d052f23728b889fe8a595edfc923d21e406902fc7e25c7b45285d22bb6d274cf679fe48bf8f6f29c30f2b7efe57c3e0079c86c512478d46490e6
|
data/lib/magellan/worker/core.rb
CHANGED
@@ -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.
|
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
|
+
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.
|
155
|
+
rubygems_version: 2.4.5
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: ''
|