ocean-rails 3.8.5 → 3.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ocean/api.rb +5 -2
- data/lib/ocean/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7907bef448ff63fa20f0c141985564936a49a3b
|
4
|
+
data.tar.gz: 59a58a48cb77d5fd15d860f96a0a8979c7af2173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c12d6d7a12a8a46e81095eec81accd9321a4dd81b821ff3b9ab190c01f540f6c46d180c0171459f7cb3eb060b9bd741d46c5cd792209271f854e36df422f0869
|
7
|
+
data.tar.gz: d42e5f2400021d23a0a63dd8a493372a28eb1ac98a6c2ddd88ce29055e926e18c077e9c76440a081dde7ac370849f2558a5f83cf3c9c19dfd373bac2e38cf5ab
|
data/lib/ocean/api.rb
CHANGED
@@ -556,10 +556,13 @@ class Api
|
|
556
556
|
# If you have precomputed the job description hash, pass it using the keyword
|
557
557
|
# +:job+ as the only parameter.
|
558
558
|
#
|
559
|
-
def self.run_async_job(href=nil, method=nil, job: nil, **keywords)
|
560
|
-
job
|
559
|
+
def self.run_async_job(href=nil, method=nil, job: nil, **keywords, &block)
|
560
|
+
job ||= async_job_body(href, method, **keywords)
|
561
561
|
Api.request "#{INTERNAL_OCEAN_API_URL}/v1/async_jobs", :post,
|
562
562
|
body: job.to_json, x_api_token: Api.service_token
|
563
|
+
rescue TimeoutError, NoResponseError => e
|
564
|
+
raise e unless block
|
565
|
+
block.call e
|
563
566
|
end
|
564
567
|
|
565
568
|
end
|
data/lib/ocean/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ocean-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Bengtson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|