wait for pending batches