<commit_before>from celery.task.schedules import crontab
from celery.decorators import periodic_task
from celery.utils.log import get_task_logger
from app.services.collector_service import CollectorService

logger = get_task_logger(__name__)


@periodic_task(
    run_every=(crontab()),
    name="one minute task",
)
def task_save_latest_flickr_image():
    """
    One minute period task
    """
    logger.info("Executed one minute period task")<commit_msg>added task to collect very high ap and rap matches<commit_after>from celery.task.schedules import crontab
from celery.decorators import periodic_task
from celery.utils.log import get_task_logger
from app.services.collector_service import CollectorService

logger = get_task_logger(__name__)

@periodic_task(
    run_every=(crontab()),
    name="collect Very High AP and RAP matches task",
)
def task_collect_very_high_ap_rap_matches():
    """
    Collect Very High AP and RAP matches task
    """
    very_high_collector = CollectorService(3, ap=True, rap=True)
    matches_recorded =very_high_collector.collect_from_last_100()
{'fraction_non_alphanumeric': 0.07911683532658693, 'fraction_numerical': 0.0036798528058877645, 'mean_word_length': 5.476190476190476, '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': '169005', 'n_tokens_mistral': 334, 'n_tokens_neox': 320, 'n_words': 86}