Add retry_wait and nb_tries parameters