app/parsers/bulkrax/application_parser.rb in bulkrax-5.4.2 vs app/parsers/bulkrax/application_parser.rb in bulkrax-5.5.0
- old
+ new
@@ -268,11 +268,11 @@
# rubocop:disable Rails/SkipsModelValidations
def invalid_record(message)
current_run.invalid_records ||= ""
current_run.invalid_records += message
current_run.save
- ImporterRun.find(current_run.id).increment!(:failed_records)
- ImporterRun.find(current_run.id).decrement!(:enqueued_records) unless ImporterRun.find(current_run.id).enqueued_records <= 0 # rubocop:disable Style/IdenticalConditionalBranches
+ ImporterRun.increment_counter(:failed_records, current_run.id)
+ ImporterRun.decrement_counter(:enqueued_records, current_run.id) unless ImporterRun.find(current_run.id).enqueued_records <= 0 # rubocop:disable Style/IdenticalConditionalBranches
end
# rubocop:enable Rails/SkipsModelValidations
# @return [Array<String>]
def required_elements