def __init__(self):
    super(Server, self).__init__()
    self._lock = threading.Lock()
    # Accumulated bot events.
    self._bot_events = []
    # Running tasks.
    self._tasks = {}
    # Bot reported task errors.
    self._task_errors = {}
    self.has_polled = threading.Event()
    self.has_updated_task = threading.Event()
    self.must_stop = False