feat: 增加更多的同步配置日志

This commit is contained in:
xream
2025-03-16 15:48:47 +08:00
parent a70dc7b913
commit 507e37021c
5 changed files with 26 additions and 4 deletions

View File

@@ -556,8 +556,10 @@ async function syncArtifacts() {
const allSubs = $.read(SUBS_KEY);
const allCols = $.read(COLLECTIONS_KEY);
const subNames = [];
let enabledCount = 0;
allArtifacts.map((artifact) => {
if (artifact.sync && artifact.source) {
enabledCount++;
if (artifact.type === 'subscription') {
const subName = artifact.source;
const sub = findByName(allSubs, subName);
@@ -578,6 +580,13 @@ async function syncArtifacts() {
}
});
if (enabledCount === 0) {
$.info(
`需同步的配置: ${enabledCount}, 总数: ${allArtifacts.length}`,
);
return;
}
if (subNames.length > 0) {
await Promise.all(
subNames.map(async (subName) => {