def METHOD_NAME(self):
    worker = self.get_worker()
    events = [InventoryUpdateEvent(uuid=str(uuid4()), counter=-2, **self.event_create_kwargs())]
    worker.buff = {InventoryUpdateEvent: events.copy()}
    for i in range(5):
        worker.last_flush = time.time() - 2.0
        worker.flush()
    # Could not save, should be logged, and buffer should be cleared
    assert worker.buff.get(InventoryUpdateEvent, []) == []
    assert InventoryUpdateEvent.objects.filter(uuid=events[0].uuid).count() == 0  # sanity