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

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

« Previous Version 17 Current »

Purpose

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

Job logic

  1. Job starts once in 20 min by default (configured parameter MERGE_REQUEST_EXPIRATION_SCHEDULE= “*/20 * * * *”).

  2. After starting it gets value from global parameter MERGE_REQUEST_EXPIRATION_MINUTES (by default is 60 min).

  3. Select all entries from il.merge_requests with status=NEW or APPROVED:

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

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

      1. set status = EXPIRED

      2. set updated_at = current_datetime()

      3. set updated_by = system_user()

  • No labels