Initial commit of working RSS Aggregator build

This commit is contained in:
2026-05-12 17:04:02 -03:00
parent ea3a2ca53e
commit 7ac2f6e384
4962 changed files with 1032666 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import { Worker } from "bullmq";
import { prisma } from "./db.js";
import fetchFeed from "./rss/fetchFeed.js";
import processEntries from "./rss/processEntries.js";
// BullMQ v4 requires host + port, NOT url
const connection = {
host: "redis",
port: 6379
};
new Worker("feeds", async (job) => {
const feedId = job.data.feedId;
const feed = await prisma.feed.findUnique({ where: { id: feedId } });
if (!feed)
return;
const parsed = await fetchFeed(feed.url);
await processEntries(feedId, parsed);
}, { connection });
console.log("Worker running");