fix mess
This commit is contained in:
parent
12cbe62765
commit
fffb298205
1 changed files with 14 additions and 12 deletions
14
site.js
14
site.js
|
@ -155,8 +155,6 @@ async function siteCollector(user, path, site, useLimit) {
|
||||||
let congested = [];
|
let congested = [];
|
||||||
|
|
||||||
for (let u of users) {
|
for (let u of users) {
|
||||||
let inLegal = penv.indexOf(u) != -1;//legal.indexOf(u) != -1;
|
|
||||||
|
|
||||||
let it = 0;
|
let it = 0;
|
||||||
while (p.length >= (process.env.maxRate || 15)) {
|
while (p.length >= (process.env.maxRate || 15)) {
|
||||||
p = p.filter(x => x != 'hi');
|
p = p.filter(x => x != 'hi');
|
||||||
|
@ -171,23 +169,27 @@ async function siteCollector(user, path, site, useLimit) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data[u] = { followers: [], following: [] };
|
data[u] = { followers: [], following: [] };
|
||||||
p.push(async function (k) {
|
p.push(async function (k, u) {
|
||||||
|
let inLegal = penv.indexOf(u) != -1;//legal.indexOf(u) != -1;
|
||||||
|
|
||||||
let j1 = await siteCollector(u, 'followers', site, inLegal);
|
let j1 = await siteCollector(u, 'followers', site, inLegal);
|
||||||
|
|
||||||
data[u].followers = j1;
|
data[u].followers = j1;
|
||||||
console.log(`User ${u} followers fully calculated`);
|
console.log(`User ${u} followers fully calculated`);
|
||||||
|
|
||||||
p[k] = 'hi';
|
p[k] = 'hi';
|
||||||
}(p.length));
|
}(p.length, u));
|
||||||
|
|
||||||
|
p.push(async function (k, u) {
|
||||||
|
let inLegal = penv.indexOf(u) != -1;//legal.indexOf(u) != -1;
|
||||||
|
|
||||||
p.push(async function (k) {
|
|
||||||
let j1 = await siteCollector(u, 'following', site, inLegal);
|
let j1 = await siteCollector(u, 'following', site, inLegal);
|
||||||
|
|
||||||
data[u].following = j1;
|
data[u].following = j1;
|
||||||
console.log(`User ${u} following fully calculated`);
|
console.log(`User ${u} following fully calculated`);
|
||||||
|
|
||||||
p[k] = 'hi';
|
p[k] = 'hi';
|
||||||
}(p.length));
|
}(p.length,u));
|
||||||
}
|
}
|
||||||
|
|
||||||
p = p.concat(congested);
|
p = p.concat(congested);
|
||||||
|
|
Loading…
Reference in a new issue