def process(self, event):
    if (event['id'] in self._backlog):
        if self._process(event):
            self.logger.info(('Processed id %d from backlog.' % event['id']))
            del self._backlog[event['id']]
            self._updateLastEventId(event)
    elif ((self._lastEventId is not None) and (event['id'] <= self._lastEventId)):
        msg = 'Event %d is too old. Last event processed was (%d).'
        self.logger.debug(msg, event['id'], self._lastEventId)
    elif self._process(event):
        self._updateLastEventId(event)
    return self._active
def process(self, event):
    if (event['id'] in self._backlog):
        if self._process(event):
            self.logger.info(('Processed id %d from backlog.' % event['id']))
            del self._backlog[event['id']]
            self._updateLastEventId(event)
    elif ((self._lastEventId is not None) and (event['id'] <= self._lastEventId)):
        msg = 'Event %d is too old. Last event processed was (%d).'
        self.logger.debug(msg, event['id'], self._lastEventId)
    elif self._process(event):
        self._updateLastEventId(event)
    return self._active