def add_with_retry
      success = false

      (1..MeterCat.config.retry_attempts).each do
        begin
          success = add
          break if success
        rescue ActiveRecord::StaleObjectError, ActiveRecord::RecordNotUnique
        end
        Kernel.sleep(MeterCat.config.retry_delay)
      end

      return success
    end
def add_with_retry
      success = false

      (1..MeterCat.config.retry_attempts).each do
        begin
          success = add
          break if success
        rescue ActiveRecord::StaleObjectError, ActiveRecord::RecordNotUnique
        end
        Kernel.sleep(MeterCat.config.retry_delay)
      end

      return success
    end
Calls #add with retry logic up to ::MAX_ADD_ATTEMPTS times.
 Catches ActiveRecord::StaleObjectError and ActiveRecord::RecordNotUnique for retries.
 Returns the result of the final call to #add