MCPcopy Create free account
hub / github.com/amrkmn/x / finalizeFullUpdate

Function finalizeFullUpdate

scripts/task.ts:82–104  ·  view source on GitHub ↗
(
    command: 'static' | 'full',
    useCache: boolean,
    data: Awaited<ReturnType<typeof loadExtensionsData>>,
    changed: boolean
)

Source from the content-addressed store, hash-verified

80 await persistQuickUpdates(true);
81}
82
83async function finalizeFullUpdate(
84 command: 'static' | 'full',
85 useCache: boolean,
86 data: Awaited<ReturnType<typeof loadExtensionsData>>,
87 changed: boolean
88): Promise<void> {
89 if (!changed) {
90 await persistQuickUpdates(false);
91 return;
92 }
93
94 await saveExtensionsData(data);
95 logger.info('task', 'extensions_json updated=true');
96
97 if (command === 'full') {
98 await generateDataJson(data);
99 if (useCache) await refreshMetadata(await generateCacheKey(), CACHE_PATHS);
100 await updateMeilisearch();
101 if (useCache) await saveStaticCache();
102 }
103
104 await persistQuickUpdates(true);
105}
106
107function reportMaterializeFailures(

Callers 1

updateExtensionsFunction · 0.85

Calls 8

saveExtensionsDataFunction · 0.90
generateDataJsonFunction · 0.90
refreshMetadataFunction · 0.90
generateCacheKeyFunction · 0.90
updateMeilisearchFunction · 0.90
persistQuickUpdatesFunction · 0.85
saveStaticCacheFunction · 0.85
infoMethod · 0.80

Tested by

no test coverage detected