<commit_before># Django
from django.db.models.signals import post_save

# This app
from .models import RawImage
from .tasks import index_raw_image


def start_indexing_task(sender, instance, created, **kwargs):
    if created:
        index_raw_image.delay(instance.id)


post_save.connect(start_indexing_task, sender = RawImage)<commit_msg>(rawdata) Have a delay when indexing raw images after upload.<commit_after># Django
from django.db.models.signals import post_save

# This app
from .models import RawImage
from .tasks import index_raw_image


def start_indexing_task(sender, instance, created, **kwargs):
    if created:
        index_raw_image.apply_async(args=(instance.id,), countdown = 300)


post_save.connect(start_indexing_task, sender = RawImage)
{'fraction_non_alphanumeric': 0.08541392904073587, 'fraction_numerical': 0.003942181340341655, 'mean_word_length': 5.35, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1732256', 'n_tokens_mistral': 240, 'n_tokens_neox': 228, 'n_words': 64}