fixed a race condition when deleting a pipeline (changed the whole method to deleted jobs)