Skip to content

Commit

Permalink
Update task status on error
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Nov 7, 2019
1 parent 6a04684 commit 9443db4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/miq_server/log_management.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def post_one_log_pattern(pattern, logfile, log_type)
logfile.upload
rescue StandardError, Timeout::Error => err
_log.error("#{log_prefix} Posting of #{log_type.downcase} logs failed for #{who_am_i} due to error: [#{err.class.name}] [#{err}]")
task.update_status("Finished", "Error", "Posting of #{log_type.downcase} logs failed for #{who_am_i} due to error: [#{err.class.name}] [#{err}]")
logfile.update(:state => "error")
raise
ensure
Expand Down

0 comments on commit 9443db4

Please sign in to comment.