def listen(self, last=None, types=None, max_wait=5):
        while True:
            if last is not None:
                after = last['rc_timestamp']
                after_id = last['rc_id']
            else:
                after = None
                after_id = None

            start = time.time()
            rcs = self.query(after=after, after_id=after_id, direction="newer")

            count = 0
            for rc in rcs:
                yield rc
                count += 1

            time.sleep(max_wait - (time.time() - start))
Listens to the recent changes table.  Given no parameters, this function
dataset/ETHPy150Open mediawiki-utilities/python-mediawiki-utilities/mw/database/collections/recent_changes.py/RecentChanges.listen