Ejemplo n.º 1
0
def job_function():
    if data_uploader_helper.is_trade_day():
        strftime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        print(f"{strftime} LevelDataInfo.py  start")
        date = getYesterday().strftime('%Y-%m-%d')
        print(f"【main().date={date}】")
        getDataByDate(date)
def job_function():
    if data_uploader_helper.is_trade_day():
        strftime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        print(f"{strftime} LevelDataInfoSh_sum.py  start")
        date = getYesterday()
        print(f"【main().beginDate={date.strftime('%Y%m%d')}】")
        start_main(date.strftime('%Y%m%d'))
        strftime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        print(f"{strftime} LevelDataInfoSh_sum.py  end")
Ejemplo n.º 3
0
def job_function():
    if data_uploader_helper.is_trade_day():
        strftime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        print(f"{strftime} GoodDataInfo.py  start")
        date = getYesterday().strftime('%Y-%m-%d')
        print(f"【main().date={date}】")
        for mode in array:
            start_main(date, mode)
        strftime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        print(f"{strftime} GoodDataInfo.py  end")
Ejemplo n.º 4
0
def job_function():
    if data_uploader_helper.is_trade_day():
        import datetime
        strftime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        print(f"{strftime} LevelDataInfoSh_sum.py  start")
        date = getYesterday()
        if debug:
            date = datetime.date.today() + datetime.timedelta(-30)
        today_strftime = datetime.date.today().strftime('%Y%m%d')
        print(f"【main().beginDate={date.strftime('%Y%m%d')}】")
        print(f"【main().endDate={today_strftime}】")
        start_main(date.strftime('%Y%m%d'), today_strftime)
        strftime = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
        print(f"{strftime} LevelDataInfoSh_sum.py  end")
Ejemplo n.º 5
0
def job_function():
    if data_uploader_helper.is_trade_day(True):
        date = industry_moneyflow_eastmoney.get_latest_date()
        print(date)
        new_item_arr = []
        for i in range(2):
            data = getdata(i + 1)
            new_item_arr.extend(data)
        for index,item in enumerate(new_item_arr):
            item = transfer_fields(item)
            item['source'] = '同花顺'
            item['交易日期'] = date
            print(f"insert {index}.{item}")
            data_uploader_helper.upload_one(item, 'industry_money_flow')
        dumps = json.dumps(new_item_arr, indent=4, ensure_ascii=False)
        print(dumps)
def job_function():
    if data_uploader_helper.is_trade_day():
        all_industry = get_industry()
        if all_industry:
            dumps = json.dumps(all_industry, indent=4, ensure_ascii=False)
            print(dumps)