use gevent for parallel batching