swh.scheduler.updater.writer: Write tasks in batch
Also, make the writer stops when no more data to write