grenache-ruby-http 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/worker.rb +1 -1
- data/lib/grenache/http.rb +2 -1
- data/lib/grenache/http/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: 20fa647ee2208ea6dc289a3ae3bb15ec05eef710
|
4
|
+
data.tar.gz: 0c87d09f78ec8e5ecebe0fbc73bf2102c2cd378d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c57c064c97cde2144b257c85d2777b07c532506262bb933805ab928f1bf040000bcd0d9bcd32ab4867c7d9eee43d54122a2f8fe78ecd141d69c0f6c5a303f975
|
7
|
+
data.tar.gz: ea181b7099a215dc36d52cf4d7b9b39dd4bc514e8ca2049cefc8baa0a01262320dc81341c739bfab41e5f79b1d62b51628349841dc0e28077a7c01559233a155
|
data/examples/worker.rb
CHANGED
data/lib/grenache/http.rb
CHANGED
@@ -12,7 +12,8 @@ module Grenache
|
|
12
12
|
EM.defer {
|
13
13
|
app = -> (env) {
|
14
14
|
req = ServiceMessage.parse(env['rack.input'].read)
|
15
|
-
|
15
|
+
e, payload = block.call(req)
|
16
|
+
err = e.kind_of?(Exception) ? e.message : e
|
16
17
|
[200,nil, ServiceMessage.new(payload, err, req.rid).to_json]
|
17
18
|
}
|
18
19
|
server = Thin::Server.start('0.0.0.0', port, app, {signals: false})
|