fix(lifecycle): 「元数据已刷新」事件改在 refreshMetadata 内与刷新同事务发出,覆盖语言回刷与剧集组切换;下一轮待办完成后移出计划
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Cxwgnn2pbzQ7rXv3rq7fei
This commit is contained in:
1 parent
6d37a337c9
commit
155f30417c
4 files changed
+11
-15
No files matched your search
@@ -5,7 +5,6 @@ import type { SourcesRuntime } from "./runtime.ts";
|
||||
import { refreshSiteAccount } from "./service/account.ts";
|
||||
import { AUTO_ENRICH_TASK, runAutoEnrich } from "./service/enrich.ts";
|
||||
import { ingestFeed } from "./service/feeds.ts";
|
||||
import { emitMetadataRefreshed } from "./service/lifecycle-events.ts";
|
||||
import { refreshMetadata } from "./service/metadata.ts";
|
||||
import { prewarmMetadata } from "./service/metadata-prewarm.ts";
|
||||
import { resolveRelease } from "./service/resolve.ts";
|
||||
@@ -78,16 +77,8 @@ export function registerSourcesTasks(registry: TaskRegistry, rt: () => SourcesRu
|
||||
retryPolicy: NETWORK_RETRY,
|
||||
handler: (t) =>
|
||||
t.step.run("refresh", async () => {
|
||||
const r = await refreshMetadata(rt(), t.input.mediaEntityId, { full: !!t.input.full });
|
||||
// 生命周期广播(ADR-006):元数据已刷新(在调用方发,刷新本身在 metadata.ts)
|
||||
if (r.status === "refreshed")
|
||||
await emitMetadataRefreshed(rt().ctx, rt().ctx.db, {
|
||||
mediaEntityId: t.input.mediaEntityId,
|
||||
full: !!t.input.full,
|
||||
changedFields: r.changedFields,
|
||||
runId: t.runId,
|
||||
});
|
||||
return r;
|
||||
// 「元数据已刷新」生命周期事件在 refreshMetadata 内与刷新同事务发出
|
||||
return await refreshMetadata(rt(), t.input.mediaEntityId, { full: !!t.input.full });
|
||||
}),
|
||||
}),
|
||||
// 关注作品预热(统一元数据缓存):详情 / 各季 / 剧集组 / 图片先进缓存;网络道,走 TMDB 客户端限流
|
||||
|
||||
Reference in new issue
Block a user