<commit_before>package de.otto.edison.mongo.configuration;

import com.mongodb.client.MongoDatabase;
import de.otto.edison.jobs.repository.JobRepository;
import de.otto.edison.jobs.repository.JobMetaRepository;
import de.otto.edison.mongo.jobs.MongoJobRepository;
import de.otto.edison.mongo.jobs.MongoJobMetaRepository;
import org.slf4j.Logger;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;

import static de.otto.edison.mongo.jobs.MongoJobMetaRepository.JOBMETA_COLLECTION_NAME;
import static de.otto.edison.mongo.jobs.MongoJobRepository.JOB_INFO_COLLECTION_NAME;
import static org.slf4j.LoggerFactory.getLogger;

@Configuration
@ConditionalOnClass(name = "de.otto.edison.jobs.configuration.JobsConfiguration")
public class MongoJobsConfiguration {

    private static final Logger LOG = getLogger(MongoJobsConfiguration.class);

    @Bean
    @ConditionalOnMissingBean(name = "jobRepository")
    public JobRepository jobRepository(final MongoDatabase mongoDatabase) {
        LOG.info("===============================");
        LOG.info("Using MongoJobRepository with %s MongoDatabase impl.", mongoDatabase.getClass().getSimpleName());
        LOG.info("===============================");
        return new MongoJobRepository(mongoDatabase, JOB_INFO_COLLECTION_NAME);
    }

    @Bean
    @ConditionalOnMissingBean(name = "jobMetaRepository")
    public JobMetaRepository jobMetaRepository(final MongoDatabase mongoDatabase) {
        LOG.info("===============================");
        LOG.info("Using MongoJobMetaRepository with %s MongoDatabase impl.", mongoDatabase.getClass().getSimpleName());
        LOG.info("===============================");
        return new MongoJobMetaRepository(mongoDatabase, JOBMETA_COLLECTION_NAME);
    }

}<commit_msg>Definining ordering of job repositories<commit_after>package de.otto.edison.mongo.configuration;

import com.mongodb.client.MongoDatabase;
import de.otto.edison.jobs.repository.JobRepository;
import de.otto.edison.jobs.repository.JobMetaRepository;
import de.otto.edison.mongo.jobs.MongoJobRepository;
import de.otto.edison.mongo.jobs.MongoJobMetaRepository;
import org.slf4j.Logger;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.annotation.Order;

import static de.otto.edison.mongo.jobs.MongoJobMetaRepository.JOBMETA_COLLECTION_NAME;
import static de.otto.edison.mongo.jobs.MongoJobRepository.JOB_INFO_COLLECTION_NAME;
import static org.slf4j.LoggerFactory.getLogger;

@Configuration
@ConditionalOnClass(name = "de.otto.edison.jobs.configuration.JobsConfiguration")
public class MongoJobsConfiguration {

    private static final Logger LOG = getLogger(MongoJobsConfiguration.class);

    @Bean
    @Order(1)
    @ConditionalOnMissingBean(name = "jobRepository")
    public JobRepository jobRepository(final MongoDatabase mongoDatabase) {
        LOG.info("===============================");
        LOG.info("Using MongoJobRepository with %s MongoDatabase impl.", mongoDatabase.getClass().getSimpleName());
        LOG.info("===============================");
        return new MongoJobRepository(mongoDatabase, JOB_INFO_COLLECTION_NAME);
    }

    @Bean
    @Order(1)
    @ConditionalOnMissingBean(name = "jobMetaRepository")
    public JobMetaRepository jobMetaRepository(final MongoDatabase mongoDatabase) {
        LOG.info("===============================");
        LOG.info("Using MongoJobMetaRepository with %s MongoDatabase impl.", mongoDatabase.getClass().getSimpleName());
        LOG.info("===============================");
        return new MongoJobMetaRepository(mongoDatabase, JOBMETA_COLLECTION_NAME);
    }

}
{'fraction_non_alphanumeric': 0.1504007543611504, 'fraction_numerical': 0.0014144271570014145, 'mean_word_length': 6.059900166389351, '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': '21973', 'n_tokens_mistral': 1205, 'n_tokens_neox': 1149, 'n_words': 184}