data_input.py 文件源码

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

项目:algo-trading-pipeline 作者: NeuralKnot 项目源码 文件源码
def prune_databases(self):
        for source in self.sources:
            self.logger.log("Data Input/Pruner", "informative", "Pruning: " + source["news_api_name"])

            db = source["articles_db"]

            q = Query()
            test_func = lambda at: arrow.get(at) < (arrow.now() - datetime.timedelta(days=1))
            docs = db.search(q.at.test(test_func))

            eids = [doc.eid for doc in docs]
            db.remove(eids=eids)

    # Entry point for process
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号