NASA-AMMOS / common-workflow-service

Apache License 2.0
17 stars 10 forks source link

Need to Cleanup old rows in cws_sched_worker_proc_inst and cws_proc_inst_status #36

Open galenatjpl opened 3 years ago

galenatjpl commented 3 years ago

Cleanup these rows, based on the historyDaysToLive value

cws.cws_sched_worker_proc_inst rows | keep only last 2 weeks of data | DELETE FROM cws.cws_sched_worker_proc_inst WHERE created_time < now() - interval 14 DAY and status != 'pending'; | yes |

cws.cws_proc_inst_status | keep only last 2 weeks of data | DELETE FROM cws.cws_proc_inst_status WHERE end_time is not null and end_time < now() - interval 14 DAY;

galenatjpl commented 3 years ago

Criticality: low-medium (Project already has a workaround) Time estimate: 2 days