improving resubmit failed jobs script to account for multiple rescue dags