Added function to query delete job