lyber-core 7.4.2 → 7.5.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 +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e631494dfd0e92ddb58b8a92f9414d6ab8b3861d7cb831dc0a2166cc0a097e1
|
4
|
+
data.tar.gz: c0177b4b844a61a15eed8ab50ab16264dd28faecd13eaa15c0afaadab05d256a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1197fbc8f99343df897746a9289e1eeabf56e80d43d7a37ff861fb5997fe8a57774ca7149b34f12ad38b4172a7f1f9fc891e85b9fbbdba84a7f02b236ef2ba8d
|
7
|
+
data.tar.gz: 32d345176540a0e35bed7f41309cb481ead4e0d40d7d068ed4b9b3ce20610cb5258d89201f4f228e0d01eb2c0578140525a170ccea60a20b2fb85d61e17c8328
|
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.5.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-05-06 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: activesupport
|
@@ -66,14 +66,14 @@ dependencies:
|
|
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
|
@@ -232,14 +232,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
232
232
|
requirements:
|
233
233
|
- - ">="
|
234
234
|
- !ruby/object:Gem::Version
|
235
|
-
version: '3.
|
235
|
+
version: '3.2'
|
236
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
237
|
requirements:
|
238
238
|
- - ">="
|
239
239
|
- !ruby/object:Gem::Version
|
240
240
|
version: 1.3.6
|
241
241
|
requirements: []
|
242
|
-
rubygems_version: 3.5.
|
242
|
+
rubygems_version: 3.5.9
|
243
243
|
signing_key:
|
244
244
|
specification_version: 4
|
245
245
|
summary: Core services used by the SUL Digital Library
|