Skip to content

⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.

bug fix

daniel31x1349262d52cf37
diff --git a/lib/api/preservationScheme/handleReadability.ts b/lib/api/preservationScheme/handleReadability.ts
index 5d3eca73..992ee917 100644
--- a/lib/api/preservationScheme/handleReadability.ts
+++ b/lib/api/preservationScheme/handleReadability.ts
@@ -5,7 +5,7 @@ import { prisma } from "../db";
import createFile from "../storage/createFile";
import { Link } from "@prisma/client";
-const handleReadablility = async (
+const handleReadability = async (
content: string,
link: Link,
keepContent?: boolean
@@ -58,4 +58,4 @@ const handleReadablility = async (
}
};
-export default handleReadablility;
+export default handleReadability;
diff --git a/scripts/worker.ts b/scripts/worker.ts
index d0ecbabf..b14e4b18 100644
--- a/scripts/worker.ts
+++ b/scripts/worker.ts
@@ -240,8 +240,22 @@ export async function startIndexing() {
while (true) {
const links = await getLinkBatch({
where: {
- OR: [{ indexVersion: { not: INDEX_VERSION } }, { indexVersion: null }],
- lastPreserved: { not: null },
+ AND: [
+ {
+ OR: [
+ { indexVersion: { not: INDEX_VERSION } },
+ { indexVersion: null },
+ ],
+ },
+ {
+ OR: [
+ { lastPreserved: { not: null } },
+ {
+ url: null,
+ },
+ ],
+ },
+ ],
},
take: indexTakeCount,
include: {
@@ -276,10 +290,9 @@ export async function startIndexing() {
tags: link.tags.map((t) => t.name),
pinnedBy: link.pinnedBy.map((p) => p.id),
creationTimestamp: Date.parse(link.createdAt.toISOString()) / 1000,
+ indexVersion: INDEX_VERSION,
}));
- console.log(docs);
-
const task = await meiliClient.index("links").addDocuments(docs);
await meiliClient
.index("links")