Add retry loop to the promote function