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

Suspend contract and legal entity type cron job

Purpose

This cron job is designed for suspend legal entity in case no verification within the fixed period and suspension of the related contract, if any.

Configuration

Parameter

Description

Value

Parameter

Description

Value

LEGAL_ENTITY_SUSPENDER_SCHEDULE

How often to perform requests cleaning in cron format (config parameter)

0 * * * *

LEGAL_ENTITY_SUSPEND_PERIOD_DAYS

LE verification waiting period (config parameter)

90

Job logic

  1. Find records in prm.legal_entitities for which flag nhs_verified = false and it was set 90 (config) days ago.

    1. set legal_entitities.status = Suspended, set legal_entitities.status_reason = ‘auto_suspend_legal_entity' 'AUTO_SUSPEND’

    2. find contracts by contractor_legal_entity_id=legal_entities.id and status='VERIFIED', set ops.contracts.is_suspended=true, ops.contracts.status_reason='auto_suspend_legal_entity'

Related content

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