diff --git a/eleventy.config.js b/eleventy.config.js index 487f799..7646b18 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -2179,18 +2179,19 @@ export default function (eleventyConfig) { } console.log(`[websub] Notifying hub for ${feedUrls.length} URLs...`); - for (const feedUrl of feedUrls) { + await Promise.all(feedUrls.map(async (feedUrl) => { try { const res = await fetch(hubUrl, { method: "POST", headers: { "Content-Type": "application/x-www-form-urlencoded" }, body: `hub.mode=publish&hub.url=${encodeURIComponent(feedUrl)}`, + signal: AbortSignal.timeout(5000), }); console.log(`[websub] Notified hub for ${feedUrl}: ${res.status}`); } catch (err) { console.error(`[websub] Hub notification failed for ${feedUrl}:`, err.message); } - } + })); // Force garbage collection after post-build work completes. // V8 doesn't return freed heap pages to the OS without GC pressure.