Skip to content

Commit

Permalink
handle runtimeerror in metadata import
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Fenner committed Dec 18, 2018
1 parent fe65839 commit 96023d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/doi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def self.import_by_day(options={})

# update_columns will NOT trigger validations and Elasticsearch indexing
doi.update_columns(attrs)
rescue TypeError, NoMethodError, ActiveRecord::LockWaitTimeout => error
rescue TypeError, NoMethodError, RuntimeError, ActiveRecord::LockWaitTimeout => error
logger.error "[MySQL] Error importing metadata for " + doi.doi + ": " + error.message
else
count += 1
Expand Down Expand Up @@ -426,7 +426,7 @@ def self.import_by_day_missing(options={})

# update_columns will NOT trigger validations and Elasticsearch indexing
doi.update_columns(attrs)
rescue TypeError, NoMethodError, ActiveRecord::LockWaitTimeout => error
rescue TypeError, NoMethodError, RuntimeError, ActiveRecord::LockWaitTimeout => error
logger.error "[MySQL] Error importing metadata for " + doi.doi + ": " + error.message
else
count += 1
Expand Down

0 comments on commit 96023d4

Please sign in to comment.