<commit_before># -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand

from ...models import Scene, ScheduledDownload


class Command(BaseCommand):
    help = """Download and process all the new Scenes."""

    def handle(self, *args, **options):
        for sd in ScheduledDownload.objects.all():
            sd.download_new_scene()
            sd.check_last_scene()

        for scene in Scene.objects.filter(status='downloaded'):
            scene.process()<commit_msg>add sys.exit to download command<commit_after># -*- coding: utf-8 -*-
import sys

from django.core.management.base import BaseCommand

from ...models import Scene, ScheduledDownload


class Command(BaseCommand):
    help = """Download and process all the new Scenes."""

    def handle(self, *args, **options):
        for sd in ScheduledDownload.objects.all():
            sd.download_new_scene()
            sd.check_last_scene()

        for scene in Scene.objects.filter(status='downloaded'):
            scene.process()

        sys.exit(0)
{'fraction_non_alphanumeric': 0.11946050096339114, 'fraction_numerical': 0.002890173410404624, 'mean_word_length': 2.906015037593985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6516630', 'n_tokens_mistral': 288, 'n_tokens_neox': 276, 'n_words': 80}