forked from ghost/ghost
Source code of Ghost - On Ghost
A failure made the batch come up short, so drain() stopped and rows behind it waited for the 15-minute retry. Loop while batches are full, and skip rows already tried in this drain so a failure is not retried at once.