This commit is contained in:
dheepa
2021-08-09 11:14:23 +00:00
parent a0d3257be0
commit f3cf5e1d2d
89 changed files with 4769 additions and 1508 deletions

View File

@@ -4,7 +4,8 @@ CREATE OR REPLACE FUNCTION fw_core.fn_run_trx_rollback(p_client_id int,p_functio
declare
f record;
begin
for f in select file_syspk,file_mnemonic
for f in select file_syspk,file_mnemonic
from fw_core.fw_jobctl_file_runschedule where latest_runschedule_flag = '1' and end_status = 'error'
and end_status_note in ('stg2_failed','TRX_failed')
order by file_syspk
@@ -162,13 +163,8 @@ CREATE OR REPLACE FUNCTION fw_core.fn_run_trx_rollback(p_client_id int,p_functio
delete from transactional.iht_hot_air_mapping_results where file_syspk = f.file_syspk;
end if;
end loop;
update fw_core.fw_jobctl_runschedule_jobstep set end_status_note = 'rollback completed', end_status='success', end_time=now() where job_id = p_job_id and step_id = p_step_id and latest_runschedule_flag = '1';
--insert into fw_core.track_jobstep select *,'roll_back' from fw_core.fw_jobctl_runschedule_jobstep;
--insert into fw_core.track_file select *,'roll_back' from fw_core.fw_jobctl_file_runschedule;
--insert into fw_core.track_file_sheet select *,'roll_back' from fw_core.fw_jobctl_file_sheet_runschedule;
end;
$$ LANGUAGE plpgsql;