Skip to content

Commit 9694a95

Browse files
author
robot
committed
feat: 七天更新用户信息
1 parent 62797f5 commit 9694a95

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

static/users/generate.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@ async function run(incremental = true) {
3333

3434
return Promise.all(ps);
3535
}
36+
let incremental = true;
3637

37-
const incremental = true;
38-
38+
// 七天全量更新一次
39+
if (getDay(TODAY) - getDay(meta.dailyCheck.lastUpdateTime) >= 7) {
40+
incremental = false;
41+
}
3942
run(incremental).then(() =>
4043
fs.writeFileSync(__dirname + "/index.json", JSON.stringify(users))
4144
);

0 commit comments

Comments
 (0)