automatic failure recovery for workunits

restart workunits for one time if it fails, and send back to server to requeue if it continue to fail