ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Purpose

This job limit the time of request being in status NEW. It changes status of person to preperson merge requests to EXPIRED after configured period of it existance.

Job logic

  1. Job starts once in 24 hours.

  2. After starting it gets value from global parameter PERSON_TO_PREPERSON_MERGE_REQUEST_TTL.

  3. Select all entries from mpi.merge_person_preperson_request with status=NEW:

    1. If inserted_at > current_datetime() - PERSON_TO_PREPERSON_MERGE_REQUEST_TTL. Then skip the record

    2. If inserted_at =< current_datetime() - PERSON_TO_PREPERSON_MERGE_REQUEST_TTL. Then update entry:

      1. set status = EXPIRED

      2. set updated_at = current_datetime()

      3. set updated_by = system_user()

  • No labels