<commit_before>Meteor.publish('done_ticker', function () {
  return DoneTicker.find({}, {});
});


//No allow / deny since only the server is allowed to edit.

// Code to select todos done for the ticker.

Meteor.setInterval( function () {
  candidates = Todos.find({done: true, private: false}, {sort: {ticktime: -1}, limit: 10});
  DoneTicker.remove({});

  candidates.forEach(function (todo) {
    userCfg = Meteor.users.findOne(todo.userId);
    if(!userCfg || !userCfg.profile ||!userCfg.profile.display_name)
      userCfg = {display_name: "anon"};
    DoneTicker.insert({text: todo.text, display_name: userCfg.profile.display_name});
  });
}, 60*5*1000 );


<commit_msg>fix bug with done ticker on missing user-profile data<commit_after>Meteor.publish('done_ticker', function () {
  return DoneTicker.find({}, {});
});


//No allow / deny since only the server is allowed to edit.

// Code to select todos done for the ticker.

Meteor.setInterval( function () {
  candidates = Todos.find({done: true, private: false}, {sort: {ticktime: -1}, limit: 10});
  DoneTicker.remove({});

  candidates.forEach(function (todo) {
    userCfg = Meteor.users.findOne(todo.userId);
    if(!userCfg || !userCfg.profile ||!userCfg.profile.display_name)
      userCfg = {profile:{display_name: "anon"}};
    DoneTicker.insert({text: todo.text, display_name: userCfg.profile.display_name});
  });
}, 60*5*1000 );



{'fraction_non_alphanumeric': 0.16381766381766383, 'fraction_numerical': 0.014245014245014245, 'mean_word_length': 4.362595419847328, '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': '6619889', 'n_tokens_mistral': 491, 'n_tokens_neox': 462, 'n_words': 110}