Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
Purpose

AUTO-Terminating expired OTP.

Logic

  • Fetch records from `otp`, where:

    • status = 'NEW'
    • expired_at < now() 
  • Update (Set values) OTP items 
    1. status  =  EXPIRED
    2. updated_at = now()