Subversion Repositories SmartDukaan

Rev

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

Rev 14268 Rev 14359
Line 82... Line 82...
82
    get_all_items_to_list_on_fbg, get_all_fbg_listed_items, check_services, \
82
    get_all_items_to_list_on_fbg, get_all_fbg_listed_items, check_services, \
83
    get_items, add_hs_item, get_hs_item, update_hs_item, get_pricing_for_dtr
83
    get_items, add_hs_item, get_hs_item, update_hs_item, get_pricing_for_dtr
84
from shop2020.thriftpy.model.v1.catalog.ttypes import status, \
84
from shop2020.thriftpy.model.v1.catalog.ttypes import status, \
85
    CatalogServiceException
85
    CatalogServiceException
86
from shop2020.utils.Utils import log_entry, to_py_date
86
from shop2020.utils.Utils import log_entry, to_py_date
-
 
87
from dtr.utils.FetchLivePrices import getLatestPrice 
87
import datetime
88
import datetime
88
 
89
 
89
class CatalogServiceHandler:
90
class CatalogServiceHandler:
90
    '''
91
    '''
91
    classdocs
92
    classdocs
Line 1771... Line 1772...
1771
    def getPricingForDtr(self,catalogItemId):
1772
    def getPricingForDtr(self,catalogItemId):
1772
        try:
1773
        try:
1773
            return to_t_item(get_pricing_for_dtr(catalogItemId))
1774
            return to_t_item(get_pricing_for_dtr(catalogItemId))
1774
        finally:
1775
        finally:
1775
            close_session()
1776
            close_session()
-
 
1777
            
-
 
1778
    def getLatestPricing(self, skuBundleId, source_id):
-
 
1779
        print "get latest pricing"
-
 
1780
        try:
-
 
1781
            print getLatestPrice(skuBundleId, source_id)
-
 
1782
        finally:
-
 
1783
            close_session()
1776
    
1784
    
1777
if __name__ == '__main__':
1785
if __name__ == '__main__':
1778
    items = get_all_alive_items()
1786
    items = get_all_alive_items()
1779
    ret_items = []
1787
    ret_items = []
1780
    for item in items:
1788
    for item in items: