worker.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:tushare-data-sync 作者: HUMANAMUH 项目源码 文件源码
def fetch_history(stock, start, end):
    """
    History data forward answer authority
    """
    disable_stdout()
    with timer(logtime("ts.get_h_data('%s', autype=None, start='%s', end='%s', drop_factor=False)" % (stock, start, end))):
        df = await wait_concurrent(event_loop, proc_pool, ts.get_h_data, stock, autype=None, start=start, end=end, drop_factor=False, pause=0.05)
    if df is None:
        logging.debug("no history data for stock: ts.get_h_data('%s', autype=None, start='%s', end='%s')" % (stock, start, end))
        return
    df['stock'] = stock
    ans = df.reset_index()
    return history_buffer.proc_data(ans)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号