diff --git a/app/interactions/actions/email_check.rb b/app/interactions/actions/email_check.rb index 0f3ca52a1f..f83f2dd2c5 100644 --- a/app/interactions/actions/email_check.rb +++ b/app/interactions/actions/email_check.rb @@ -36,11 +36,11 @@ def destroy_old_validations(validation_events, minimum_size) def filtering_old_failed_records(result) events = validation_eventable.validation_events - destroy_old_validations(events, 3) if @check_level == 'mx' && !result.success + destroy_old_validations(events, ValidationEvent::MX_CHECK) if @check_level == 'mx' && !result.success - destroy_old_validations(events, 1) if @check_level == 'mx' && result.success + destroy_old_validations(events, ValidationEvent::REDEEM_EVENTS_COUNT_BY_LEVEL[:mx]) if @check_level == 'mx' && result.success - destroy_old_validations(events, 1) if @check_level == 'smtp' + destroy_old_validations(events, ValidationEvent::REDEEM_EVENTS_COUNT_BY_LEVEL[:smtp]) if @check_level == 'smtp' end def save_result(result)