# coding=utf-8
from __future__ import unicode_literals, absolute_import, print_function


from rpc.decorators import bind
from rpc.context import get_current_context_or_throw_exception

from api.tool.smart_rank import service_rerank


@bind("api/smartrank/rerank")
def smart_rerank(service_ids):
    service_rerank(service_ids)
    ctx = get_current_context_or_throw_exception()
    ctx.logger.app(service_ids=service_ids)