diff --git a/app/models/doi.rb b/app/models/doi.rb index ac53ae55c..3fb37e792 100644 --- a/app/models/doi.rb +++ b/app/models/doi.rb @@ -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, RuntimeError, ActiveRecord::LockWaitTimeout => error + rescue TypeError, NoMethodError, RuntimeError, ActiveRecord::StatementInvalid, ActiveRecord::LockWaitTimeout => error logger.error "[MySQL] Error importing metadata for " + doi.doi + ": " + error.message else count += 1 @@ -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, RuntimeError, ActiveRecord::LockWaitTimeout => error + rescue TypeError, NoMethodError, RuntimeError, ActiveRecord::StatementInvalid, ActiveRecord::LockWaitTimeout => error logger.error "[MySQL] Error importing metadata for " + doi.doi + ": " + error.message else count += 1