lyber-core 7.4.2 → 7.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lyber_core/robot.rb +6 -6
- data/lib/lyber_core/version.rb +1 -1
- data/lib/lyber_core/workflow.rb +22 -15
- data/lib/lyber_core/workflow_client_factory.rb +1 -1
- metadata +50 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9ed0c812c1f67354df3b5a866533d133505b97a009fd564a28bd7b66fda7e4f
|
4
|
+
data.tar.gz: 2fd1a9458a2cb649c28ec0b9c7fe3f32486aa9ad55212be9dbd470fd06096f8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a18f87bf3bdd09a609698b64e27f3e1093d90c0f8d1bb81ae94a4576002c0a14cc669c606c841a32061796a309610c0242f07173c58c50518565477c9af2959d
|
7
|
+
data.tar.gz: 10e08bd6f4804d7caa15fdf24adbc2fe73b6752f626458bebaeb42a5c2258e3205cf6a2038e2b6ffaaafd43c93f10cd1ee2af094f139785573d881d9a70c7c7e
|
data/lib/lyber_core/robot.rb
CHANGED
@@ -19,7 +19,7 @@ module LyberCore
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def workflow_service
|
22
|
-
@workflow_service ||= WorkflowClientFactory.build(logger:
|
22
|
+
@workflow_service ||= WorkflowClientFactory.build(logger:)
|
23
23
|
end
|
24
24
|
|
25
25
|
def object_client
|
@@ -40,7 +40,7 @@ module LyberCore
|
|
40
40
|
# rubocop:disable Metrics/MethodLength
|
41
41
|
def perform(druid)
|
42
42
|
@druid = druid
|
43
|
-
Honeybadger.context(druid
|
43
|
+
Honeybadger.context(druid:, process:, workflow_name:)
|
44
44
|
|
45
45
|
logger.info "#{druid} processing #{process} (#{workflow_name})"
|
46
46
|
return unless check_item_queued?
|
@@ -103,10 +103,10 @@ module LyberCore
|
|
103
103
|
# rubocop:enable Metrics/AbcSize
|
104
104
|
|
105
105
|
def workflow
|
106
|
-
@workflow ||= Workflow.new(workflow_service
|
107
|
-
druid
|
108
|
-
workflow_name
|
109
|
-
process:
|
106
|
+
@workflow ||= Workflow.new(workflow_service:,
|
107
|
+
druid:,
|
108
|
+
workflow_name:,
|
109
|
+
process:)
|
110
110
|
end
|
111
111
|
|
112
112
|
def check_item_queued?
|
data/lib/lyber_core/version.rb
CHANGED
data/lib/lyber_core/workflow.rb
CHANGED
@@ -11,39 +11,46 @@ module LyberCore
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def start!(note)
|
14
|
-
workflow_service.update_status(druid
|
14
|
+
workflow_service.update_status(druid:,
|
15
15
|
workflow: workflow_name,
|
16
|
-
process
|
16
|
+
process:,
|
17
17
|
status: 'started',
|
18
18
|
elapsed: 1.0,
|
19
|
-
note:
|
19
|
+
note:)
|
20
20
|
end
|
21
21
|
|
22
22
|
def complete!(status, elapsed, note)
|
23
|
-
workflow_service.update_status(druid
|
23
|
+
workflow_service.update_status(druid:,
|
24
24
|
workflow: workflow_name,
|
25
|
-
process
|
26
|
-
status
|
27
|
-
elapsed
|
28
|
-
note:
|
25
|
+
process:,
|
26
|
+
status:,
|
27
|
+
elapsed:,
|
28
|
+
note:)
|
29
29
|
end
|
30
30
|
|
31
31
|
def error!(error_msg, error_text)
|
32
|
-
workflow_service.update_error_status(druid
|
32
|
+
workflow_service.update_error_status(druid:,
|
33
33
|
workflow: workflow_name,
|
34
|
-
process
|
35
|
-
error_msg
|
36
|
-
error_text:
|
34
|
+
process:,
|
35
|
+
error_msg:,
|
36
|
+
error_text:)
|
37
|
+
end
|
38
|
+
|
39
|
+
# @return [Hash] any workflow context associated with the workflow
|
40
|
+
def context
|
41
|
+
@context ||= workflow_service.process(pid: druid,
|
42
|
+
workflow_name:,
|
43
|
+
process:).context
|
37
44
|
end
|
38
45
|
|
39
46
|
def status
|
40
|
-
@status ||= workflow_service.workflow_status(druid
|
47
|
+
@status ||= workflow_service.workflow_status(druid:,
|
41
48
|
workflow: workflow_name,
|
42
|
-
process:
|
49
|
+
process:)
|
43
50
|
end
|
44
51
|
|
45
52
|
def lane_id
|
46
|
-
@lane_id ||= workflow_service.process(pid: druid, workflow_name
|
53
|
+
@lane_id ||= workflow_service.process(pid: druid, workflow_name:, process:).lane_id
|
47
54
|
end
|
48
55
|
|
49
56
|
private
|
@@ -4,7 +4,7 @@ module LyberCore
|
|
4
4
|
# Factory for creating a workflow client
|
5
5
|
class WorkflowClientFactory
|
6
6
|
def self.build(logger:)
|
7
|
-
Dor::Workflow::Client.new(url: Settings.workflow.url, logger
|
7
|
+
Dor::Workflow::Client.new(url: Settings.workflow.url, logger:, timeout: Settings.workflow.timeout)
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lyber-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.
|
4
|
+
version: 7.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alpana Pande
|
@@ -16,7 +16,7 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2024-
|
19
|
+
date: 2024-10-07 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: activesupport
|
@@ -52,28 +52,28 @@ dependencies:
|
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '15.0'
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '15.0'
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: dor-workflow-client
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '7.4'
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
76
|
+
version: '7.4'
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: druid-tools
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -172,6 +172,34 @@ dependencies:
|
|
172
172
|
- - "~>"
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '1.24'
|
175
|
+
- !ruby/object:Gem::Dependency
|
176
|
+
name: rubocop-capybara
|
177
|
+
requirement: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
type: :development
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
- !ruby/object:Gem::Dependency
|
190
|
+
name: rubocop-factory_bot
|
191
|
+
requirement: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
196
|
+
type: :development
|
197
|
+
prerelease: false
|
198
|
+
version_requirements: !ruby/object:Gem::Requirement
|
199
|
+
requirements:
|
200
|
+
- - ">="
|
201
|
+
- !ruby/object:Gem::Version
|
202
|
+
version: '0'
|
175
203
|
- !ruby/object:Gem::Dependency
|
176
204
|
name: rubocop-rspec
|
177
205
|
requirement: !ruby/object:Gem::Requirement
|
@@ -186,6 +214,20 @@ dependencies:
|
|
186
214
|
- - ">="
|
187
215
|
- !ruby/object:Gem::Version
|
188
216
|
version: '0'
|
217
|
+
- !ruby/object:Gem::Dependency
|
218
|
+
name: rubocop-rspec_rails
|
219
|
+
requirement: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - ">="
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: '0'
|
224
|
+
type: :development
|
225
|
+
prerelease: false
|
226
|
+
version_requirements: !ruby/object:Gem::Requirement
|
227
|
+
requirements:
|
228
|
+
- - ">="
|
229
|
+
- !ruby/object:Gem::Version
|
230
|
+
version: '0'
|
189
231
|
- !ruby/object:Gem::Dependency
|
190
232
|
name: simplecov
|
191
233
|
requirement: !ruby/object:Gem::Requirement
|
@@ -232,14 +274,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
274
|
requirements:
|
233
275
|
- - ">="
|
234
276
|
- !ruby/object:Gem::Version
|
235
|
-
version: '3.
|
277
|
+
version: '3.2'
|
236
278
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
279
|
requirements:
|
238
280
|
- - ">="
|
239
281
|
- !ruby/object:Gem::Version
|
240
282
|
version: 1.3.6
|
241
283
|
requirements: []
|
242
|
-
rubygems_version: 3.5.
|
284
|
+
rubygems_version: 3.5.15
|
243
285
|
signing_key:
|
244
286
|
specification_version: 4
|
245
287
|
summary: Core services used by the SUL Digital Library
|