# -*- coding: UTF-8 -*-

from rpc.decorators import bind
from .tasks import write_to_es


@bind('api/gaia_data_sync')
def data_sync_diary(pk_list, es_type, configuration, **kwargs):
    write_to_es.apply_async(
        kwargs=dict(
            es_type=es_type,
            pk_list=pk_list,
            configuration=configuration,
        ),
    )
