<commit_before>from celery import task

from django.utils import timezone
from django.db.models import Q

import datetime

import logging
logger = logging.getLogger('sake')

@task()
def change_days():
    from riskgame.models import Team

    # For all Teams without a check datetime update their day
    teams = Team.objects.filter(Q(check_next=None) | Q(check_next__gte=timezone.now()))

    for team in teams:
        team.update_current_day()

        logger.info("Updating current day for team %s", str(team))<commit_msg>fix filter for teams due for a check<commit_after>from celery import task

from django.utils import timezone
from django.db.models import Q

import datetime

import logging
logger = logging.getLogger('sake')

@task()
def change_days():
    from riskgame.models import Team

    # For all Teams without a check datetime update their day
    teams = Team.objects.filter(Q(check_next=None) | Q(check_next__lte=timezone.now()))

    for team in teams:
        team.update_current_day()

        logger.info("Updating current day for team %s", str(team))
{'fraction_non_alphanumeric': 0.08930232558139535, 'fraction_numerical': 0.0, 'mean_word_length': 4.0754716981132075, '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': '6566502', 'n_tokens_mistral': 319, 'n_tokens_neox': 311, 'n_words': 106}