<commit_before>"use strict";

//Load dependencies
var async = require("async");
var applicationStorage = process.require("core/applicationStorage.js");
var rankModel = process.require("ranks/rankModel.js");
var updateModel = process.require("updates/updateModel.js");

/**
 * BestGuildsCronProcess constructor
 * @constructor
 */
function BestGuildsCronProcess() {
}

BestGuildsCronProcess.prototype.runCron = function () {
    var logger = applicationStorage.logger;
    var config = applicationStorage.config;

    async.forEach(config.progress.raids,function(raid,callback){
        async.waterfall([
            function(callback){
                //Load all guild in progress
                rankModel.getRanking("tier_"+raid.tier+"#"+raid.name,0,500,function(error,ranking){
                    callback(error,ranking);
                });
            },
            function(ranking,callback) {
                async.forEachSeries(ranking,function(guildStr,callback){
                    var guildArray = guildStr.split('#');

                    updateModel.insert("wp_gu", guildArray[0], guildArray[1], guildArray[2], 5, function (error) {<commit_msg>Add 1500 guilds to update in best guild<commit_after>"use strict";

//Load dependencies
var async = require("async");
var applicationStorage = process.require("core/applicationStorage.js");
var rankModel = process.require("ranks/rankModel.js");
var updateModel = process.require("updates/updateModel.js");

/**
 * BestGuildsCronProcess constructor
 * @constructor
 */
function BestGuildsCronProcess() {
}

BestGuildsCronProcess.prototype.runCron = function () {
    var logger = applicationStorage.logger;
    var config = applicationStorage.config;

    async.forEach(config.progress.raids,function(raid,callback){
        async.waterfall([
            function(callback){
                //Load all guild in progress
                rankModel.getRanking("tier_"+raid.tier+"#"+raid.name,0,1500,function(error,ranking){
                    callback(error,ranking);
                });
            },
            function(ranking,callback) {
                async.forEachSeries(ranking,function(guildStr,callback){
                    var guildArray = guildStr.split('#');

                    updateModel.insert("wp_gu", guildArray[0], guildArray[1], guildArray[2], 5, function (error) {
{'fraction_non_alphanumeric': 0.12526629740093737, 'fraction_numerical': 0.008947592671495527, 'mean_word_length': 3.0343642611683848, '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': '7132553', 'n_tokens_mistral': 668, 'n_tokens_neox': 612, 'n_words': 109}