def _queue(self):
        try:
            obj = self.get_queryset()[0]
        except:
            obj = False

        if not obj:
            while True:
                msg = u"compatibility: true\n"
                msg += u"retry: 10000\n"
                msg += u"data: {0}\n\n".format(
                    json.dumps({"action": "error"}))
                yield msg
                time.sleep(10)
        else:
            while True:
                pubsub = self._db(obj)
                for m in pubsub.listen():
                    if m['type'] not in 'message':
                        msg = u"compatibility: true\n"
                        msg += u"retry: 10000\n"
                        msg += u"data: {0}\n\n".format(m['data'])
                        yield msg
                ping = u"compatibility: true\n"
                ping += u"retry: 10000\n"
                ping += u"data: {0}\n\n".format(
                    json.dumps({"action": "ping"}))
                yield ping
                time.sleep(0.5)
dataset/ETHPy150Open opps/opps/opps/contrib/notifications/views.py/AsyncServer._queue/operator `==` -> `not in`