<commit_before>var cadence = require('cadence')
var logger = require('prolific.logger').createLogger('mingle.srv')
var sprintf = require('sprintf-js').sprintf

module.exports = cadence(function (async, dns, name, format) {
    async([function () {
        dns.resolve(name, 'SRV', async())
    }, function (error) {
        logger.error('resolve.SRV', { stack: error.stack })
        return [ async.break, [] ]
    }], function (records) {
        async.map(function (record) {
            async([function () {
                dns.resolve(record.name, 'A', async())
            }, function (error) {
                logger.error('resolve.A', { stack: error.stack, record: record })
                return [ async.break, null ]
            }], function (address) {
                return [ sprintf(format, address, +record.port) ]
            })
        })(records)
    }, function (discovered) {<commit_msg>Fix break caused by Cadence changes.<commit_after>var cadence = require('cadence')
var logger = require('prolific.logger').createLogger('mingle.srv')
var sprintf = require('sprintf-js').sprintf

module.exports = cadence(function (async, dns, name, format) {
    async([function () {
        dns.resolve(name, 'SRV', async())
    }, function (error) {
        logger.error('resolve.SRV', { stack: error.stack })
        return [ async.break, [] ]
    }], function (records) {
        async.map(function (record) {
            var block = async([function () {
                dns.resolve(record.name, 'A', async())
            }, function (error) {
                logger.error('resolve.A', { stack: error.stack, record: record })
                return [ block.break, null ]
            }], function (address) {
                return [ block.break, sprintf(format, address, +record.port) ]
            })()
        })(records)
    }, function (discovered) {
{'fraction_non_alphanumeric': 0.15879828326180256, 'fraction_numerical': 0.0, 'mean_word_length': 2.3543165467625897, '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': '4853876', 'n_tokens_mistral': 531, 'n_tokens_neox': 526, 'n_words': 114}