def queue_event(self, event):
        if not event:
            return

        self.pending_events.append(event)

        if self._waiting_to_send:
            return

        self._waiting_to_send = True

        def last_out_sends():
            eventlet.sleep(self.batch_interval)
            self._waiting_to_send = False
            self._notify()

        eventlet.spawn_n(last_out_sends)
Called to queue sending an event with the next batch of events.
dataset/ETHPy150Open openstack/neutron/neutron/notifiers/batch_notifier.py/BatchNotifier.queue_event