Fix build race condition

This commit is contained in:
SukkaW 2023-09-11 01:53:41 +08:00
parent ce61f67e63
commit 2e36d4888c
2 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,6 @@ const filterRuleWhitelistDomainSets = new Set(PREDEFINED_WHITELIST);
const domainKeywordsSet = new Set();
/** @type {Set<string>} Dedupe domains included by DOMAIN-SUFFIX */
const domainSuffixSet = new Set();
(async () => {
console.time('Total Time - build-reject-domain-set');
@ -119,7 +118,7 @@ const domainSuffixSet = new Set();
previousSize = domainSets.size - previousSize;
console.log(`Import ${previousSize} rules from reject_sukka.conf!`);
for await (const line of readFileByLine(pathResolve(__dirname, '../List/non_ip/reject.conf'))) {
for await (const line of readFileByLine(pathResolve(__dirname, '../Source/non_ip/reject.conf'))) {
if (line.startsWith('DOMAIN-KEYWORD')) {
const [, ...keywords] = line.split(',');
domainKeywordsSet.add(keywords.join(',').trim());
@ -232,6 +231,7 @@ const domainSuffixSet = new Set();
fs.promises.writeFile(
pathResolve(__dirname, '../List/internal/reject-stats.txt'),
Object.entries(rejectDomainsStats)
.filter(a => a[1] > 1)
.sort((a, b) => {
const t = b[1] - a[1];
if (t === 0) {

View File

@ -8,7 +8,7 @@
如果你正在使用商业性质的公共代理服务,请务必先仔细阅读相关服务商的 服务条款与条件ToS。部分公共代理服务商的服务条款与条件规定如果用户使用任何第三方规则文件将会被视为自动放弃 SLA 和技术支持服务。
如果你从 Sukka 提供的 Surge Ruleset Server[`https://ruleset.skk.moe`](https://ruleset.skk.moe))获取本项目中的规则组文件,则意味着你已知晓并同意 [隐私政策](https://skk.moe/privacy-policy/) 中的所有条款。如果你不同意,请通过 GitHub 获取本项目中的源码、自行构建规则组文件。
如果你从 Sukka 提供的 Ruleset Server[`https://ruleset.skk.moe`](https://ruleset.skk.moe))获取本项目中的规则组文件,则意味着你已知晓并同意 [隐私政策](https://skk.moe/privacy-policy/) 中的所有条款。如果你不同意,请通过 GitHub 获取本项目中的源码、自行构建规则组文件。
## 规则组列表