Example #1
0
 def repairArchivedMISCache(self, as_of_date):
     path = self.mis_cache_path + "archived/" + as_of_date.strftime(
         "%Y-%m-%d") + "/"
     f = FundManager(path)
     while True:
         error = f.checkCache()
         if not error[0]:
             m_updater = MISCacheUpdater(path)
             for e in error[1]:
                 print e[0], "--- missing", e[1]
                 if e[1] == "product_rep":
                     m_updater.loadProductData(as_of_date)
                 elif e[1] == "fund_rep":
                     m_updater.loadFundData(as_of_date)
                 elif e[1] == "meeting":
                     m_updater.loadMeetingsData(as_of_date, e[0])
                 elif e[1] == "exposure":
                     m_updater.loadExposureData(as_of_date, e[0])
                 elif e[1] == "aum":
                     m_updater.loadAumData(as_of_date, e[0])
                 elif e[1] == "return":
                     m_updater.loadReturnsData(as_of_date, e[0])
                 elif e[1] == "stats":
                     m_updater.loadStatisticsData(as_of_date, e[0])
                 elif e[1] == "transactions":
                     m_updater.loadInternalTransactionData(as_of_date, e[0])
                 elif e[1] == "holding":
                     m_updater.loadHoldingsData(as_of_date, e[0])
                 elif e[1] == "trans_rep":
                     m_updater.loadTransactionData(as_of_date)
                 elif e[1] == "people_org_rep":
                     m_updater.loadContactsData(as_of_date)
         else:
             break
Example #2
0
 def repairArchivedMISCache(self,as_of_date):
     path = self.mis_cache_path + "archived/" + as_of_date.strftime("%Y-%m-%d") + "/"
     f = FundManager(path)
     while True:
         error = f.checkCache()
         if not error[0]:
             m_updater = MISCacheUpdater(path)
             for e in error[1]:
                 print e[0], "--- missing", e[1]
                 if e[1] == "product_rep":
                     m_updater.loadProductData(as_of_date)
                 elif e[1] == "fund_rep":
                     m_updater.loadFundData(as_of_date)  
                 elif e[1] == "meeting":
                     m_updater.loadMeetingsData(as_of_date,e[0])
                 elif e[1] == "exposure":
                     m_updater.loadExposureData(as_of_date,e[0])
                 elif e[1] == "aum":
                     m_updater.loadAumData(as_of_date,e[0])
                 elif e[1] == "return":
                     m_updater.loadReturnsData(as_of_date,e[0])
                 elif e[1] == "stats":
                     m_updater.loadStatisticsData(as_of_date,e[0])
                 elif e[1] == "transactions":
                     m_updater.loadInternalTransactionData(as_of_date,e[0])
                 elif e[1] == "holding":
                     m_updater.loadHoldingsData(as_of_date,e[0])
                 elif e[1] == "trans_rep":
                     m_updater.loadTransactionData(as_of_date)
                 elif e[1] == "people_org_rep":
                     m_updater.loadContactsData(as_of_date)
         else:
             break