lyber-core 6.1.0 → 6.1.1
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 +10 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72f25a04a8a79879923e52f8a0ba9e8fbb7d7a92deaf195961548cab5898baf2
|
4
|
+
data.tar.gz: 9dd75e18b11858d897a1dcdeabb0841595bc1a5db02fed17fe84bdf78c7a249d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 479c21c2be8a01e3545035009cfda6c2655e5d78f8e191a5e901be7e33eec7ff2f5b3a0623afce4d73edab1b31f79da0c43f3e0afa379dd40914079ee248476f
|
7
|
+
data.tar.gz: edeed4efdf04ee301091f104c1e40047a9f124cfe269be8de88103a0b8ec27632298d9f9a06a1c379b98c0d019131f785721777be41fba924cf92280d6d60b4a
|
data/lib/lyber_core/robot.rb
CHANGED
@@ -12,9 +12,9 @@ module LyberCore
|
|
12
12
|
module ClassMethods
|
13
13
|
# Called by job-manager on derived-class
|
14
14
|
# Instantiate the Robot and call #work with the passed in druid
|
15
|
-
def perform(druid)
|
15
|
+
def perform(druid, *context)
|
16
16
|
bot = new
|
17
|
-
bot.work druid
|
17
|
+
bot.work druid, context
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -37,11 +37,11 @@ module LyberCore
|
|
37
37
|
# rubocop:disable Metrics/AbcSize
|
38
38
|
# rubocop:disable Metrics/CyclomaticComplexity
|
39
39
|
# rubocop:disable Metrics/PerceivedComplexity
|
40
|
-
def work(druid)
|
40
|
+
def work(druid, context)
|
41
41
|
Honeybadger.context(druid: druid, process: process, workflow_name: workflow_name) if defined? Honeybadger
|
42
42
|
workflow = workflow(druid)
|
43
|
-
LyberCore::Log.set_logfile($stdout) # let process manager
|
44
|
-
LyberCore::Log.info "#{druid} processing #{process} (#workflow_name)"
|
43
|
+
LyberCore::Log.set_logfile($stdout) # let process manager handle logging
|
44
|
+
LyberCore::Log.info "#{druid} processing #{process} (#{workflow_name})"
|
45
45
|
return if check_queued_status && !item_queued?(druid)
|
46
46
|
|
47
47
|
# this is the default note to pass back to workflow service,
|
@@ -54,7 +54,11 @@ module LyberCore
|
|
54
54
|
|
55
55
|
result = nil
|
56
56
|
elapsed = Benchmark.realtime do
|
57
|
-
result = perform
|
57
|
+
result = if method(:perform).arity == 1
|
58
|
+
perform druid # implemented in the mixed-in robot class
|
59
|
+
else
|
60
|
+
perform druid, context
|
61
|
+
end
|
58
62
|
end
|
59
63
|
|
60
64
|
# the final workflow state is determined by the return value of the perform step, if it is a ReturnState object,
|
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: 6.1.
|
4
|
+
version: 6.1.1
|
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: 2020-
|
19
|
+
date: 2020-03-29 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: coveralls
|
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
153
153
|
- !ruby/object:Gem::Version
|
154
154
|
version: 1.3.6
|
155
155
|
requirements: []
|
156
|
-
rubygems_version: 3.
|
156
|
+
rubygems_version: 3.1.2
|
157
157
|
signing_key:
|
158
158
|
specification_version: 4
|
159
159
|
summary: Core services used by the SUL Digital Library
|