class ElasticAPM::TimedWorker
def collect_batched_transactions
def collect_batched_transactions batch = [] begin while (transaction = pending_transactions.pop(true)) && batch.length <= config.max_queue_size batch << transaction end rescue ThreadError # queue empty end batch end