opener-webservice 2.1.0 → 2.1.1
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/opener/webservice/option_parser.rb +7 -0
- data/lib/opener/webservice/server.rb +15 -0
- data/lib/opener/webservice/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: bcfca37aec31db27f77ce6bfeffe15c9fc89bdad
|
4
|
+
data.tar.gz: 678817c70f9dcf4f91974c8b271ed6c260353ecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2feefc026aac2ea39b6f9c02c0594de34eadbf9fecca3d3f59972474e407cb8b0b134c1466a2205d9864463fe60ec74f557534fc97b84a0a6df3624d84597534
|
7
|
+
data.tar.gz: 0f970d19e8770a1b72106f66737762f7e43da40ec331a161d9bc77130aa3a0cee52c453ba2a21e9e6449b01e27d521d8bfd821a38a8799520e38d77726c3f0ac
|
@@ -159,6 +159,13 @@ Puma Options:
|
|
159
159
|
GC::Profiler.enable
|
160
160
|
end
|
161
161
|
|
162
|
+
if Configuration.syslog?
|
163
|
+
Core::Syslog.open(
|
164
|
+
ENV['APP_NAME'],
|
165
|
+
::Syslog::LOG_CONS | ::Syslog::LOG_PID
|
166
|
+
)
|
167
|
+
end
|
168
|
+
|
162
169
|
Configuration.configure_rollbar
|
163
170
|
|
164
171
|
# Puma on JRuby does some weird stuff with forking/exec. As a result
|
@@ -159,6 +159,11 @@ module Opener
|
|
159
159
|
request_id = options['request_id'] || SecureRandom.hex
|
160
160
|
final_url = options['callbacks'].last
|
161
161
|
|
162
|
+
Core::Syslog.info(
|
163
|
+
"Processing asynchronous request with final URL #{final_url}",
|
164
|
+
:request_id => request_id
|
165
|
+
)
|
166
|
+
|
162
167
|
async { analyze_async(options, request_id) }
|
163
168
|
|
164
169
|
content_type :json
|
@@ -236,6 +241,11 @@ module Opener
|
|
236
241
|
new_payload.delete('input')
|
237
242
|
|
238
243
|
if Configuration.output_bucket
|
244
|
+
Core::Syslog.info(
|
245
|
+
"Uploading output to s3://#{Configuration.output_bucket}",
|
246
|
+
:request_id => request_id
|
247
|
+
)
|
248
|
+
|
239
249
|
uploader = Uploader.new
|
240
250
|
object = uploader.upload(request_id, output, options['metadata'])
|
241
251
|
|
@@ -244,6 +254,11 @@ module Opener
|
|
244
254
|
new_payload['input'] = output
|
245
255
|
end
|
246
256
|
|
257
|
+
Core::Syslog.info(
|
258
|
+
"Submitting output to #{next_url}",
|
259
|
+
:request_id => request_id
|
260
|
+
)
|
261
|
+
|
247
262
|
CallbackHandler.new.post(next_url, new_payload)
|
248
263
|
end
|
249
264
|
|