Skip to content

Commit

Permalink
line in between constants and first method, make string use in update…
Browse files Browse the repository at this point in the history
…_workflow_status call consistent w/ other strings in the class
  • Loading branch information
jmartin-sul committed Jun 14, 2018
1 parent 8311840 commit 505cc9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/services/workflow_reporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ class WorkflowReporter
DOR = 'dor'.freeze
PRESERVATIONAUDITWF = 'preservationAuditWF'.freeze
NO_WORKFLOW_HOOKUP = 'no workflow hookup - assume you are in test or dev environment'.freeze
COMPLETED = 'completed'

# this method will always return true because of the dor-workflow-service gem
# see issue sul-dlss/dor-workflow-service#50 for more context
def self.report_error(druid, process_name, error_message)
Expand All @@ -17,7 +19,7 @@ def self.report_error(druid, process_name, error_message)

def self.report_completed(druid, process_name)
if Settings.workflow_services_url.present?
Dor::WorkflowService.update_workflow_status(DOR, "druid:#{druid}", PRESERVATIONAUDITWF, process_name, 'completed')
Dor::WorkflowService.update_workflow_status(DOR, "druid:#{druid}", PRESERVATIONAUDITWF, process_name, COMPLETED)
else
Rails.logger.warn(NO_WORKFLOW_HOOKUP)
end
Expand Down

0 comments on commit 505cc9e

Please sign in to comment.