diff --git a/mappings/info_recruits/supportive_jobs/check_status_parallel_recruits_info_citizen.hpl b/mappings/info_recruits/supportive_jobs/check_status_parallel_recruits_info_citizen.hpl index 8a6c549..023edb1 100644 --- a/mappings/info_recruits/supportive_jobs/check_status_parallel_recruits_info_citizen.hpl +++ b/mappings/info_recruits/supportive_jobs/check_status_parallel_recruits_info_citizen.hpl @@ -44,7 +44,6 @@ - exists JOB_PARALLEL_ERROR_EXITS PARENT_WORKFLOW @@ -71,10 +70,18 @@ ervu-dashboard N 0 - SELECT exists(select 1 - FROM etl.job_execution - where job_name in ('citizen_job', 'recruits_info_job') - and status in ('ERROR', 'PROCESSING')); + SELECT + EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name IN ('citizen_job', 'recruits_info_job') + ) + AND NOT EXISTS ( + SELECT 1 + FROM etl.job_execution + WHERE job_name IN ('citizen_job', 'recruits_info_job') + AND status IN ('PROCESSING', 'ERROR') + ); N