traxxx/src/utils/mofos.js

22 lines
482 B
JavaScript
Raw Normal View History

'use strict';
const Promise = require('bluebird');
const bhttp = require('bhttp');
const knex = require('../knex');
async function run() {
const network = await knex('networks').where('slug', 'mofos').first();
const sites = await knex('sites').where('network_id', network.id);
await Promise.map(sites, async (site) => {
const res = await bhttp.get(site.url);
console.log(site.url, res.statusCode);
}, {
concurrency: 5,
});
}
run();