<commit_before>from mailqueue.models import MailerMessage
from django.http import HttpResponse

def run_mail_job(request):
    emails = MailerMessage.objects.filter(sent=False)[:30]<commit_msg>Added support for MAILQUEUE_LIMIT to the run_mail_job view.<commit_after>from django.http import HttpResponse
from django.conf import settings

from mailqueue.models import MailerMessage
from mailqueue import defaults

def run_mail_job(request):
    limit = getattr(settings, 'MAILQUEUE_LIMIT', defaults.MAILQUEUE_LIMIT)
    emails = MailerMessage.objects.filter(sent=False)[:limit]
{'fraction_non_alphanumeric': 0.07652173913043478, 'fraction_numerical': 0.0034782608695652175, 'mean_word_length': 7.112676056338028, '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': '6156358', 'n_tokens_mistral': 165, 'n_tokens_neox': 170, 'n_words': 42}