cli.py 文件源码

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

项目:feeds 作者: nblock 项目源码 文件源码
def cleanup(ctx):
    """
    Cleanup old cache entries.

    By default, entries older than 14 days will be removed. This value can be
    overriden in the config file.
    """
    settings = ctx.obj['settings']
    # Manually configure logging since we don't have a CrawlerProcess which
    # would take care of that.
    configure_logging(settings)

    if not settings.getbool('HTTPCACHE_ENABLED'):
        logger.error('Cache is disabled, will not clean up cache dir.')
        return 1

    run_cleanup_cache(settings)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号