Beispiel #1
0
 def createArchivedMISCache(self, as_of_date):
     path = self.mis_cache_path + "archived/" + as_of_date.strftime(
         "%Y-%m-%d") + "/"
     if not os.access(path, os.F_OK):
         os.makedirs(path)
     m_updater = MISCacheUpdater(path)
     m_updater.update(as_of_date)
Beispiel #2
0
    def updateMISCache(self):
        as_of_date = self.most_recent_valid_month

        tmp_path = self.mis_cache_path + "tmp"
        cur_path = self.mis_cache_path + "current"
        arch_path = self.mis_cache_path + "archived/" + as_of_date.strftime(
            "%Y-%m-%d")

        if os.access(tmp_path, os.F_OK):
            shutil.rmtree(tmp_path)
        os.makedirs(tmp_path)

        tmp = MISCacheUpdater(tmp_path)
        tmp.update(as_of_date)

        if os.access(cur_path, os.F_OK):
            shutil.rmtree(cur_path)
        os.makedirs(cur_path)

        if os.access(arch_path, os.F_OK):
            shutil.rmtree(arch_path)
        os.makedirs(arch_path)

        cur = MISCacheUpdater(cur_path)
        cur.syncCache(tmp_path)

        cur = MISCacheUpdater(arch_path)
        cur.syncCache(tmp_path)

        if os.access(tmp_path, os.F_OK):
            shutil.rmtree(tmp_path)
Beispiel #3
0
 def updateMISCache(self):
     as_of_date = self.most_recent_valid_month
            
     tmp_path = self.mis_cache_path + "tmp"
     cur_path = self.mis_cache_path + "current"
     arch_path = self.mis_cache_path + "archived/" + as_of_date.strftime("%Y-%m-%d")
     
     if os.access(tmp_path,os.F_OK):
         shutil.rmtree(tmp_path)
     os.makedirs(tmp_path)
        
     tmp = MISCacheUpdater(tmp_path)
     tmp.update(as_of_date)
     
     if os.access(cur_path,os.F_OK):
         shutil.rmtree(cur_path)
     os.makedirs(cur_path) 
     
     if os.access(arch_path,os.F_OK):
         shutil.rmtree(arch_path)
     os.makedirs(arch_path)   
             
     cur = MISCacheUpdater(cur_path)
     cur.syncCache(tmp_path)
     
     cur = MISCacheUpdater(arch_path)
     cur.syncCache(tmp_path)
                     
     if os.access(tmp_path,os.F_OK):
         shutil.rmtree(tmp_path)
Beispiel #4
0
 def createArchivedMISCache(self,as_of_date):
     path = self.mis_cache_path + "archived/" + as_of_date.strftime("%Y-%m-%d") + "/"
     if not os.access(path,os.F_OK):
         os.makedirs(path)
     m_updater = MISCacheUpdater(path)
     m_updater.update(as_of_date)