lyber-core 3.2.5 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +13 -5
  2. data/lib/lyber_core/robot.rb +12 -6
  3. metadata +23 -22
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 413fb19b7154f57e9ff55b1a0570d9d83f863f3f
4
- data.tar.gz: 52d27d56df8354a26ce1dbefcfddd4b5cddad5fa
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ M2QzNTVhZDg1ZGZhYTNmY2IyM2IzMDBkMjBmMmY3M2IwNmYzMjJiNg==
5
+ data.tar.gz: !binary |-
6
+ ZmYxY2EzOWYyMWE2OWIyZmRiZDJkMjZmZmYxODY2OTQyMGJkNzRiYw==
5
7
  SHA512:
6
- metadata.gz: 73070d60f9817f891f0e4ccf5f53af3e737e306e923e579577322ff8fd7974bc30318063a3ae0b767b9c0df418b3bb2a3a50d04d612f6b9386316e077a0c8dbb
7
- data.tar.gz: c69c60641c28c1a93bcc22592ca2b62576bb679b22abb5d75f0e8ed5e0650d457811ac9c65932b2b723efb187b4871170cae65aadee86c302a8e9222792a17b1
8
+ metadata.gz: !binary |-
9
+ NzFiNjY5Yzk2MDUxNTI0ZWI3NjAyY2VlMjZhNDUxZGMwYzE0ODZhZWUyNGFm
10
+ YzgzMTQyMWE1MDA2YTNlN2Y3ZjNkMTc4MmFiNWU2M2U5YzVhOWQ5ZmQyMDY5
11
+ ZThkYTlkZTAxMTE4MWE2MTY2MzkwOGExZjFhMDVhMmU3ODc3MDc=
12
+ data.tar.gz: !binary |-
13
+ MzM1NzdmYmFkNzkyNjQxMWYxZjNmOTZkMjA1YWUxOWRmOGJmZjhlN2UyZmIw
14
+ OGU4YjQ2NDEyOGZjMjc5NWVjNDZlMDk5OWExMDM5Zjg3ZGI4NzlmZWMzYmM3
15
+ NmQwNDUwYzc4MTQ2ZTZkZDZlOTY3NzFlMWE2NmNjYzRiNjc2NTc=
@@ -48,6 +48,7 @@ module LyberCore
48
48
  attr_accessor :check_queued_status
49
49
 
50
50
  def initialize(repo, workflow_name, step_name, opts = {})
51
+ Signal.trap("QUIT") { puts "#{Process.pid} ignoring SIGQUIT" } # SIGQUIT ignored to let the robot finish
51
52
  @repo = repo
52
53
  @workflow_name = workflow_name
53
54
  @step_name = step_name
@@ -70,12 +71,17 @@ module LyberCore
70
71
  # if true returned, update step to completed
71
72
  # otherwise, the robot did something like set the step to 'waiting' with a note
72
73
 
73
- Dor::WorkflowService.update_workflow_status @repo, druid, @workflow_name, @step_name, 'completed', :elapsed => elapsed, :note => Socket.gethostname
74
- LyberCore::Log.info "#{druid} completed in #{sprintf("%0.4f",elapsed)}s"
75
- rescue Exception => e
76
- LyberCore::Log.error e.message + "\n" + e.backtrace.join("\n")
77
- Dor::WorkflowService.update_workflow_error_status @repo, druid , @workflow_name, @step_name, e.message, :error_text => Socket.gethostname
78
- raise e unless e.is_a?(StandardError)
74
+ # update the workflow status from 'queued' to 'completed' -- errors out if current status is not queued
75
+ Dor::WorkflowService.update_workflow_status @repo, druid, @workflow_name, @step_name, 'completed', :elapsed => elapsed, :note => Socket.gethostname, :current_status => 'queued'
76
+ LyberCore::Log.info "Finished #{druid} in #{sprintf("%0.4f",elapsed)}s"
77
+ rescue => e
78
+ begin
79
+ LyberCore::Log.error e.message + "\n" + e.backtrace.join("\n")
80
+ Dor::WorkflowService.update_workflow_error_status @repo, druid , @workflow_name, @step_name, e.message, :error_text => Socket.gethostname
81
+ rescue => e2
82
+ LyberCore::Log.error "Cannot set #{druid} to status='error'\n" + e2.message + "\n" + e2.backtrace.join("\n")
83
+ raise e2 # send exception to Resque failed queue
84
+ end
79
85
  end
80
86
 
81
87
  private
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: 3.2.5
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alpana Pande
@@ -15,109 +15,110 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2014-10-31 00:00:00.000000000 Z
18
+ date: 2014-12-04 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: dor-workflow-service
22
22
  requirement: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  type: :runtime
28
28
  prerelease: false
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.7'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: fakeweb
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  type: :development
42
42
  prerelease: false
43
43
  version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: rake
50
50
  requirement: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.8.7
55
55
  type: :development
56
56
  prerelease: false
57
57
  version_requirements: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.8.7
62
62
  - !ruby/object:Gem::Dependency
63
63
  name: rdoc
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  type: :development
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  - !ruby/object:Gem::Dependency
77
77
  name: rspec
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  type: :development
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  - !ruby/object:Gem::Dependency
91
91
  name: stompserver
92
92
  requirement: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: yard
106
106
  requirement: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
- description: |-
119
- Contains classes to make http connections with a client-cert, use Jhove, and call Suri
120
- Also contains core classes to build robots
118
+ description: ! 'Contains classes to make http connections with a client-cert, use
119
+ Jhove, and call Suri
120
+
121
+ Also contains core classes to build robots'
121
122
  email:
122
123
  - wmene@stanford.edu
123
124
  executables: []
@@ -141,17 +142,17 @@ require_paths:
141
142
  - lib
142
143
  required_ruby_version: !ruby/object:Gem::Requirement
143
144
  requirements:
144
- - - ">="
145
+ - - ! '>='
145
146
  - !ruby/object:Gem::Version
146
147
  version: '0'
147
148
  required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  requirements:
149
- - - ">="
150
+ - - ! '>='
150
151
  - !ruby/object:Gem::Version
151
152
  version: 1.3.6
152
153
  requirements: []
153
154
  rubyforge_project:
154
- rubygems_version: 2.4.2
155
+ rubygems_version: 2.4.3
155
156
  signing_key:
156
157
  specification_version: 4
157
158
  summary: Core services used by the SULAIR Digital Library