naslovnice: fokusna tocka obraza povsod (aktuelles, kategorije, videi, iskanje, clanek + sorodni), skupni pomocnik lib/focal, streznik osvezuje fokusne tocke vsakih 20 minut
This commit is contained in:
+12
-5
@@ -75,11 +75,18 @@ export async function registerRoutes(
|
||||
return res.status(401).json({ message: "Unauthorized" });
|
||||
};
|
||||
|
||||
storage.getArticles().then((articles) => {
|
||||
analyzeAllArticleImages(articles).catch(err =>
|
||||
console.log("[focal-point] Analysis skipped:", err.message)
|
||||
);
|
||||
});
|
||||
// Fokusne tocke naslovnic (kje je obraz) — brez njih object-cover obreze na
|
||||
// sredino in odreze glave. Racunamo ob zagonu IN vsakih 20 minut, da jih
|
||||
// dobijo tudi clanki, ki jih boti objavijo med tem.
|
||||
const refreshFocalPoints = () => {
|
||||
storage.getArticles().then((articles) => {
|
||||
analyzeAllArticleImages(articles).catch(err =>
|
||||
console.log("[focal-point] Analysis skipped:", err.message)
|
||||
);
|
||||
}).catch(err => console.log("[focal-point] getArticles failed:", err?.message));
|
||||
};
|
||||
refreshFocalPoints();
|
||||
setInterval(refreshFocalPoints, 20 * 60 * 1000);
|
||||
|
||||
// ---- SEO: robots.txt, sitemap.xml, news sitemap, RSS ----
|
||||
// Rubrike z onemusic.news imajo isto besedilo kot tam, zato jih ne oddajamo
|
||||
|
||||
Reference in New Issue
Block a user