Ejemplo n.º 1
0
    def handle(self, *args, **options):
        ch = logging.FileHandler('/tmp/newsdiffs_logging', mode='w')
        ch.setLevel(logging.DEBUG)
        ch.setFormatter(formatter)
        logger.addHandler(ch)

        ch = logging.FileHandler('/tmp/newsdiffs_logging_errs', mode='a')
        ch.setLevel(logging.WARNING)
        ch.setFormatter(formatter)
        logger.addHandler(ch)

        cleanup_git_repo()
        update_articles()
        update_versions(options['all'])
Ejemplo n.º 2
0
    def handle(self, *args, **options):
        ch = logging.FileHandler('/tmp/newsdiffs_logging', mode='w')
        ch.setLevel(logging.DEBUG)
        ch.setFormatter(formatter)
        logger.addHandler(ch)

        ch = logging.FileHandler('/tmp/newsdiffs_logging_errs', mode='a')
        ch.setLevel(logging.WARNING)
        ch.setFormatter(formatter)
        logger.addHandler(ch)

        cleanup_git_repo()
        update_articles()
        update_versions(options['all'])
Ejemplo n.º 3
0
    def handle(self, *args, **options):
        ch = logging.FileHandler('/tmp/newsdiffs_logging', mode='w')
        ch = logging.StreamHandler(stream=sys.stdout)
        ch.setLevel(logging.DEBUG)
        ch.setFormatter(formatter)
        logger.addHandler(ch)

        ch = logging.FileHandler(ERROR_FILE_PATH, mode='a')
        ch = logging.StreamHandler(stream=sys.stdout)
        ch.setLevel(logging.WARNING)
        ch.setFormatter(formatter)
        logger.addHandler(ch)

        for repo in all_git_repos():
            cleanup_git_repo(repo)

        todays_repo = get_and_make_git_repo()

        update_articles(todays_repo)
        update_versions(todays_repo, options['all'])

        logger.info('Done scraping!')