<commit_before>import datetime
import re
import requests
import redis
from celery import Celery

celery_app = Celery('tasks', broker='redis://')

r = redis.StrictRedis(host='localhost', db=0)


def enum(**enums):
    return type('Enum', (), enums)

TASK_STATE = enum(
    UNKNOWN='unknown',
    RUNNING='running',
    FINISHED='finished'
)


class CheckException(Exception):

    def __init__(self, msg):
        super(CheckException, self).__init__(msg)
        self.msg = msg


def report(task_state, check_id, msg, result):
    """
    Reports a check result.
    :param task_state: State of the task.
    :param check_id: ID of the check.
    :param msg: Message to display (will generally be the same despite the result)
    :param result: Result.
    :return:
    """
    if task_state == TASK_STATE.RUNNING:<commit_msg>[dashboard]: Now uses redis db /4 instead of /0<commit_after>import datetime
import re
import requests
import redis
from celery import Celery

celery_app = Celery('tasks', broker='redis://localhost:6379/4')
r = redis.StrictRedis(host='localhost', db=4)


def enum(**enums):
    return type('Enum', (), enums)

TASK_STATE = enum(
    UNKNOWN='unknown',
    RUNNING='running',
    FINISHED='finished'
)


class CheckException(Exception):

    def __init__(self, msg):
        super(CheckException, self).__init__(msg)
        self.msg = msg


def report(task_state, check_id, msg, result):
    """
    Reports a check result.
    :param task_state: State of the task.
    :param check_id: ID of the check.
    :param msg: Message to display (will generally be the same despite the result)
    :param result: Result.
    :return:
    """
    if task_state == TASK_STATE.RUNNING:
{'fraction_non_alphanumeric': 0.11934156378600823, 'fraction_numerical': 0.005291005291005291, 'mean_word_length': 3.637602179836512, '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': '6031886', 'n_tokens_mistral': 559, 'n_tokens_neox': 538, 'n_words': 163}