from talos.rpc import get_current_rpc_invoker
from talos.cache.base import diary_pv_cache
from talos.tasks.tasks import view_increase
from gm_types.gaia import CONST_STRINGS as const_strings

def diary_view_increase_num(ids=()):
    for item in ids:
        diary_pv_cache.incrby(str(item), 1)


def topic_view_increase_num(ids=()):
    for item in ids:
        view_increase(const_strings.TOPIC_VIEW, item)