Subversion Repositories SmartDukaan

Rev

Rev 12243 | Rev 12363 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12243 Rev 12256
Line 10... Line 10...
10
    to_t_voucher_item_mapping, to_t_insurer, to_t_Amazonlisted, to_t_ebay_item, \
10
    to_t_voucher_item_mapping, to_t_insurer, to_t_Amazonlisted, to_t_ebay_item, \
11
    to_t_uri_mapping, to_t_banner_list, to_t_campaign, to_t_snapdeal_item, \
11
    to_t_uri_mapping, to_t_banner_list, to_t_campaign, to_t_snapdeal_item, \
12
    to_t_snapdeal_item_details, to_t_product_feed_submit, to_t_marketplace_items, \
12
    to_t_snapdeal_item_details, to_t_product_feed_submit, to_t_marketplace_items, \
13
    to_t_marketplace_itemprice, to_t_marketplacepercentage, to_t_flipkart_item, \
13
    to_t_marketplace_itemprice, to_t_marketplacepercentage, to_t_flipkart_item, \
14
    to_t_flipkart_item_details, to_t_market_place_history, to_t_private_deal,to_t_amazonoutofsync, \
14
    to_t_flipkart_item_details, to_t_market_place_history, to_t_private_deal,to_t_amazonoutofsync, \
15
    to_t_private_deals_comparison, to_t_snapdeal_marketplace_item,to_t_flipkart_marketplace_item
15
    to_t_private_deals_comparison, to_t_snapdeal_marketplace_item,to_t_flipkart_marketplace_item,to_t_competitor_pricing
16
from shop2020.model.v1.catalog.impl.DataAcessors import add_item, retire_item, \
16
from shop2020.model.v1.catalog.impl.DataAcessors import add_item, retire_item, \
17
    change_item_status, get_item, get_all_items, get_all_items_by_status, \
17
    change_item_status, get_item, get_all_items, get_all_items_by_status, \
18
    update_item, start_item_on, close_session, retire_item_on, \
18
    update_item, start_item_on, close_session, retire_item_on, \
19
    get_items_by_catalog_id, get_best_deals, get_best_deals_catalog_ids, \
19
    get_items_by_catalog_id, get_best_deals, get_best_deals_catalog_ids, \
20
    get_best_deals_count, get_best_sellers, get_latest_arrivals, \
20
    get_best_deals_count, get_best_sellers, get_latest_arrivals, \
Line 69... Line 69...
69
    get_all_fbb_listed_items, get_count_for_marketplaceHistory, \
69
    get_all_fbb_listed_items, get_count_for_marketplaceHistory, \
70
    get_marketplace_history_by_date, get_all_fbb_pricing_items, \
70
    get_marketplace_history_by_date, get_all_fbb_pricing_items, \
71
    get_private_deal_details, get_private_deal_items, add_or_update_private_deal, \
71
    get_private_deal_details, get_private_deal_items, add_or_update_private_deal, \
72
    get_all_active_private_deals, get_private_deals_catalog_ids, \
72
    get_all_active_private_deals, get_private_deals_catalog_ids, \
73
    get_private_deals_count,get_amazon_out_of_sync,get_all_private_deals_comparison, \
73
    get_private_deals_count,get_amazon_out_of_sync,get_all_private_deals_comparison, \
74
    get_all_snapdeal_marketplaceItem,get_all_flipkart_marketplaceItem, add_competitor_scraping, get_previous_competitor_scraping
74
    get_all_snapdeal_marketplaceItem,get_all_flipkart_marketplaceItem, add_competitor_scraping, get_previous_competitor_scraping, \
-
 
75
    get_upload_result_by_id
75
from shop2020.thriftpy.model.v1.catalog.ttypes import status
76
from shop2020.thriftpy.model.v1.catalog.ttypes import status
76
from shop2020.utils.Utils import log_entry, to_py_date
77
from shop2020.utils.Utils import log_entry, to_py_date
77
import datetime
78
import datetime
78
 
79
 
79
class CatalogServiceHandler:
80
class CatalogServiceHandler:
Line 1617... Line 1618...
1617
    def getPreviousCompetitorScraping(self,delta):
1618
    def getPreviousCompetitorScraping(self,delta):
1618
        try:
1619
        try:
1619
            return get_previous_competitor_scraping(delta)
1620
            return get_previous_competitor_scraping(delta)
1620
        finally:
1621
        finally:
1621
            close_session()
1622
            close_session()
-
 
1623
    
-
 
1624
    def getUploadResultById(self,uploadId):
-
 
1625
        try:
-
 
1626
            return [to_t_competitor_pricing(item) for item in get_upload_result_by_id(uploadId)]
-
 
1627
        finally:
-
 
1628
            close_session()
1622
        
1629
        
1623
                
1630
                
1624
    
1631
    
1625
if __name__ == '__main__':
1632
if __name__ == '__main__':
1626
    items = get_all_alive_items()
1633
    items = get_all_alive_items()