move pause logic

Temporarily move pause between retrieve_batch and process_batch, to avoid locking contention