return date_list import multiprocessing if __name__ == '__main__': logger.info(msg=u"》》》》》开始进程《《《《《") date_list = np.loadtxt("daterange.npy", dtype=str, delimiter=',').tolist() # 筛掉完成的数据 try: date_list = verify_stop_status(date_list, 0) # 从未完成的方法开始调用 model.find_nofinish(lis, 'alpha101') except Exception as e: logger.error(msg=u'发生异常>>>>%s' % e) # cc_alpha101_data(date_list) len_datelist = len(date_list) per = len_datelist // 100 try: logger.info(msg=u"》》》》》》开始多线程《《《《《《") logger.info(u"开始执行循环完成指定时间区间的alpha因子值计算") for i in range(0, len_datelist, 100): thread_list = [] if i >= 100 * per: logger.info(u"时间范围为{}-{}".format(date_list[i], date_list[len_datelist])) for task in date_list[i:len_datelist]: th = threading.Thread(target=cc_alpha101_data, args=([
day = self.two_num_transfer(rawday) return year + '-' + month + '-' + day except Exception, e: L.exc(e) elif self.cid == 8: try: sl = self.raw_date.strip().split(' ') year = sl[-1] month = self.month_transfer(sl[-2]) rawday = sl[-3] day = self.two_num_transfer(rawday) return year + '-' + month + '-' + day except Exception, e: L.exc(e) else: L.error('No such site[%s] in func month_transfer' % self.cid) # 站点编码 def cidTransfer(con): if con == 'www.amazon.com': return 1 elif con == 'www.amazon.co.uk': return 2 elif con == 'www.amazon.ca': return 3 elif con == 'www.amazon.co.jp': return 4 elif con == 'www.amazon.de': return 5 elif con == 'www.amazon.fr':