def tag_category(imp_catalog_page_id=None, creation_date=None): from price.modules.imp_price.services import Services from price.tasks import add_category_assignment s = Services() for result in s.get_list_pages(imp_catalog_page_id, creation_date): log.info('Order tag category {}'.format(result)) tp = s.get_tagging_product(result.imp_catalog_page_id) add_category_assignment.delay(tp)
def tagging_product(imp_catalog_page_id=None, title=None, creation_date=None): from price.tasks import tagging_product from price.modules.imp_price.services import Services log.info( 'tagging_product params: imp_catalog_page_id: {}, title: {} , creation_date: {}' .format(imp_catalog_page_id, title, creation_date)) s = Services() no = 1 for imp_catalog_page_id, title in s.get_list_pages(imp_catalog_page_id, creation_date): tagging_product.delay(imp_catalog_page_id, title) no = no + 1 log.info('tagging_product order {} tasks'.format(no))
def tag_brand(imp_catalog_page_id=None, creation_date=None): from price.modules.imp_price.services import Services from price.tasks import add_brand_assignment log.info('tag_brand params:%r, %r)', imp_catalog_page_id, creation_date) s = Services() no = 1 for imp_catalog_page_id, name in s.get_list_pages(imp_catalog_page_id, creation_date): # log.info('Order tag brand {}'.format(imp_catalog_page_id)) tp = s.get_tagging_product(imp_catalog_page_id) add_brand_assignment.delay(tp) no = no + 1 log.info('tag_brand: order {} tasks'.format(no))