dor-services-client 3.5.0 → 3.6.0
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2d62ed8726e31d71908dd15fdf8f3921cd1c60004f35ffa6904dc5e7483503b
|
4
|
+
data.tar.gz: 79e3ad53f98986817f63dcaaa78abc41775cbdfdd0ac938ac5c46383a9d8ba29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a4347ee57212280a53a7b9160ec0093ac3174e183e911b3afda52be6bc9840530b0f09427bfa59723fa9a952b84a32fcaf6489f54ddf1e86a1334ba451ea8e4
|
7
|
+
data.tar.gz: eb336cffbd79e45fe420b0dff38a580bbbfc7ab18a716480f3fd2e079def6269fd25f5484ab1f88c56ea649eea973627b67f7c62b871966a600222dcd3cd756d
|
data/README.md
CHANGED
@@ -127,14 +127,14 @@ object_client.workspace.reset
|
|
127
127
|
object_client.embargo.update(embargo_date: date_string, requesting_user: username_string)
|
128
128
|
```
|
129
129
|
|
130
|
-
##
|
130
|
+
## Asynchronous results
|
131
131
|
|
132
132
|
Some operations are asynchronous and they return a `Location` header that displays the
|
133
133
|
result of the job. These jobs can be monitored by using `AsyncResult`.
|
134
134
|
|
135
|
-
```
|
135
|
+
```ruby
|
136
136
|
background_result_url = virtual_objects_client.create(virtual_objects: [{ parent_id: '', child_ids: [''] }])
|
137
|
-
result =
|
137
|
+
result = virtual_objects_client.async_result(url: background_result_url)
|
138
138
|
|
139
139
|
# Checks the result one time
|
140
140
|
result.complete?
|
@@ -7,6 +7,8 @@ module Dor
|
|
7
7
|
class Client
|
8
8
|
# A helper for monitoring asynchonous jobs
|
9
9
|
class AsyncResult
|
10
|
+
attr_reader :url
|
11
|
+
|
10
12
|
# @param [String] url the url of the background result
|
11
13
|
def initialize(url:)
|
12
14
|
@url = url
|
@@ -30,8 +32,6 @@ module Dor
|
|
30
32
|
@results[:output][:errors]
|
31
33
|
end
|
32
34
|
|
33
|
-
attr_reader :url, :seconds_between_requests, :timeout_in_seconds
|
34
|
-
|
35
35
|
private
|
36
36
|
|
37
37
|
def poll_until_complete(seconds_between_requests, timeout_in_seconds)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dor-services-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-10-
|
12
|
+
date: 2019-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -256,7 +256,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
256
256
|
- !ruby/object:Gem::Version
|
257
257
|
version: '0'
|
258
258
|
requirements: []
|
259
|
-
|
259
|
+
rubyforge_project:
|
260
|
+
rubygems_version: 2.7.8
|
260
261
|
signing_key:
|
261
262
|
specification_version: 4
|
262
263
|
summary: A client for dor-services-app
|