예제 #1
0
def notify_mention(user, thing):
    try:
        inbox_rel = Inbox._add(user, thing, "mention")
    except CreationError:
        # this mention was already inserted, ignore it
        g.log.error("duplicate mention for (%s, %s)", user, thing)
        return

    with query_cache.CachedQueryMutator() as m:
        m.insert(queries.get_inbox_comment_mentions(user), [inbox_rel])
        queries.set_unread(thing, user, unread=True, mutator=m)
예제 #2
0
파일: butler.py 프로젝트: AHAMED750/reddit
def notify_mention(user, thing):
    try:
        inbox_rel = Inbox._add(user, thing, "mention")
    except CreationError:
        # this mention was already inserted, ignore it
        g.log.error("duplicate mention for (%s, %s)", user, thing)
        return

    with query_cache.CachedQueryMutator() as m:
        m.insert(queries.get_inbox_comment_mentions(user), [inbox_rel])
        queries.set_unread(thing, user, unread=True, mutator=m)
예제 #3
0
def notify_mention(user, thing):
    inbox_rel = Inbox._add(user, thing, "mention")
    with query_cache.CachedQueryMutator() as m:
        m.insert(queries.get_inbox_comment_mentions(user), [inbox_rel])
        queries.set_unread(thing, user, unread=True, mutator=m)
예제 #4
0
def notify_mention(user, thing):
    inbox_rel = Inbox._add(user, thing, "mention")
    with query_cache.CachedQueryMutator() as m:
        m.insert(queries.get_inbox_comment_mentions(user), [inbox_rel])
        queries.set_unread(thing, user, unread=True, mutator=m)