<commit_before>
TaskAttempts = new Mongo.Collection("task_attempts");

console.log("Starting server with Mongo URL: " + process.env.MONGO_URL);

function parseMongoUrl(url) {
  var m = url.match("^mongodb://([^:]+):([0-9]+)/(.*)$");<commit_msg>ensure mongo indexes in meteor server<commit_after>
TaskAttempts = new Mongo.Collection("task_attempts");

console.log("Starting server with Mongo URL: " + process.env.MONGO_URL);

Meteor.startup(function() {
  collectionsAndIndices = [
    [ Applications, { id: 1 } ],
    [ Jobs, { appId: 1, id: 1 } ],
    [ Stages, { appId: 1, id: 1 } ],
    [ Stages, { appId: 1, jobId: 1 } ],
    [ StageAttempts, { appId: 1, stageId: 1, id: 1 } ],
    [ RDDs, { appId: 1, id: 1 } ],
    [ Executors, { appId: 1, id: 1 } ],
    [ Tasks, { appId: 1, stageId: 1, id: 1 } ],
    [ TaskAttempts, { appId: 1, stageId: 1, stageAttemptId: 1, id: 1 } ],
    [ Environment, { appId: 1 } ]
  ];

  collectionsAndIndices.forEach(function(collectionAndIndex) {
    var collection = collectionAndIndex[0];
    var fields = collectionAndIndex[1];
    collection._ensureIndex(fields);
  });
});


function parseMongoUrl(url) {
  var m = url.match("^mongodb://([^:]+):([0-9]+)/(.*)$");
{'fraction_non_alphanumeric': 0.19384359400998336, 'fraction_numerical': 0.02329450915141431, 'mean_word_length': 3.7928286852589643, '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': '2594942', 'n_tokens_mistral': 479, 'n_tokens_neox': 433, 'n_words': 98}