added functionality to reenqueue a failed task