Skip to content

Commit

Permalink
Use validation event constants
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoyoussef committed May 16, 2022
1 parent ec71ae1 commit 060416d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/interactions/actions/email_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 060416d

Please sign in to comment.