From 4e06b58bb49d30c43ef8e25493c623596a5d4187 Mon Sep 17 00:00:00 2001 From: Fritz Freiheit Date: Thu, 23 Jun 2022 08:46:19 -0400 Subject: [PATCH] DEEPBLUE-82 - Email results from append to work - 4 --- app/jobs/doi_minting_job.rb | 1 + app/jobs/ensure_doi_minted_job.rb | 1 + app/jobs/export_documentation_job.rb | 1 + app/jobs/ingest_script_job.rb | 1 + app/jobs/work_find_and_fix_job.rb | 1 + 5 files changed, 5 insertions(+) diff --git a/app/jobs/doi_minting_job.rb b/app/jobs/doi_minting_job.rb index 6da6bb84..6f124305 100644 --- a/app/jobs/doi_minting_job.rb +++ b/app/jobs/doi_minting_job.rb @@ -20,6 +20,7 @@ def perform( id, "" ] if debug_verbose initialize_no_args_hash( debug_verbose: debug_verbose ) job_status.main_cc_id = id + job_status.save! if 0 < job_delay return unless ::PersistHelper.find( id ).doi_pending? ::Deepblue::LoggingHelper.bold_debug [ ::Deepblue::LoggingHelper.here, diff --git a/app/jobs/ensure_doi_minted_job.rb b/app/jobs/ensure_doi_minted_job.rb index afbd4033..d269170d 100644 --- a/app/jobs/ensure_doi_minted_job.rb +++ b/app/jobs/ensure_doi_minted_job.rb @@ -25,6 +25,7 @@ def perform( id, *args ) log( event: EVENT, hostname_allowed: hostname_allowed ) return job_finished unless hostname_allowed job_status.main_cc_id = id + job_status.save! ::Deepblue::DoiMintingService.ensure_doi_minted( id: id, msg_handler: msg_handler, task: task, diff --git a/app/jobs/export_documentation_job.rb b/app/jobs/export_documentation_job.rb index 3b5d9874..d4cb266b 100644 --- a/app/jobs/export_documentation_job.rb +++ b/app/jobs/export_documentation_job.rb @@ -34,6 +34,7 @@ def perform( id: ::Deepblue::WorkViewContentService.content_documentation_collec user_email: nil ) initialize_with( debug_verbose: export_documentation_job_debug_verbose ) job_status.main_cc_id = id + job_status.save! @from_dashboard = user_email # initialize_options_from( *args, debug_verbose: export_documentation_job_debug_verbose ) # export_path = job_options_value( options, key: 'export_path', default_value: nil ) diff --git a/app/jobs/ingest_script_job.rb b/app/jobs/ingest_script_job.rb index 6a793886..91ead590 100644 --- a/app/jobs/ingest_script_job.rb +++ b/app/jobs/ingest_script_job.rb @@ -14,6 +14,7 @@ def perform( ingest_mode:, ingester:, path_to_script:, id: nil, **options ) msg_handler.debug_verbose = ingest_script_job_debug_verbose initialize_with( debug_verbose: debug_verbose, options: options ) job_status.main_cc_id = id if id.present? + job_status.save! if id.present? email_targets << ingester if ingester.present? ::Deepblue::LoggingHelper.bold_debug [ ::Deepblue::LoggingHelper.here, ::Deepblue::LoggingHelper.called_from, diff --git a/app/jobs/work_find_and_fix_job.rb b/app/jobs/work_find_and_fix_job.rb index f04c0b60..7ad0bd49 100644 --- a/app/jobs/work_find_and_fix_job.rb +++ b/app/jobs/work_find_and_fix_job.rb @@ -20,6 +20,7 @@ def perform( id, *args ) log( event: EVENT, hostname_allowed: hostname_allowed? ) return job_finished unless hostname_allowed? job_status.main_cc_id = id + job_status.save! msg_handler = ::Deepblue::MessageHandler.new( msg_queue: job_msg_queue, to_console: task, verbose: verbose,