⚡️⚡️⚡️ Self-hosted collaborative bookmark manager to collect, read, annotate, and fully preserve what matters, all in one place.
TypeScript bookmarkbookmark-managercollaborationnextjsreact-nativeread-it-laterself-hostedtypescript
more efficient logic for the background script
daniel31x13a57c3114d887
diff --git a/lib/api/archiveHandler.ts b/lib/api/archiveHandler.tsindex 96a77b24..08a35b50 100644--- a/lib/api/archiveHandler.ts+++ b/lib/api/archiveHandler.ts@@ -85,11 +85,11 @@ export default async function archiveHandler(link: LinksAndCollectionAndOwner) {image:user.archiveAsScreenshot && !link.image?.startsWith("archive")? "pending"- : undefined,+ : "unavailable",pdf:user.archiveAsPDF && !link.pdf?.startsWith("archive")? "pending"- : undefined,+ : "unavailable",readable: !link.readable?.startsWith("archive")? "pending": undefined,diff --git a/scripts/worker.ts b/scripts/worker.tsindex 5cddcf17..6b646c5a 100644--- a/scripts/worker.ts+++ b/scripts/worker.ts@@ -19,36 +19,16 @@ async function processBatch() {url: { not: null },OR: [{- collection: {- owner: {- archiveAsScreenshot: true,- },- },image: null,},{- collection: {- owner: {- archiveAsScreenshot: true,- },- },image: "pending",},///////////////////////{- collection: {- owner: {- archiveAsPDF: true,- },- },pdf: null,},{- collection: {- owner: {- archiveAsPDF: true,- },- },pdf: "pending",},///////////////////////@@ -76,36 +56,16 @@ async function processBatch() {url: { not: null },OR: [{- collection: {- owner: {- archiveAsScreenshot: true,- },- },image: null,},{- collection: {- owner: {- archiveAsScreenshot: true,- },- },image: "pending",},///////////////////////{- collection: {- owner: {- archiveAsPDF: true,- },- },pdf: null,},{- collection: {- owner: {- archiveAsPDF: true,- },- },pdf: "pending",},///////////////////////@@ -115,13 +75,6 @@ async function processBatch() {{readable: "pending",},- ///////////////////////- {- preview: null,- },- {- preview: "pending",- },],},take: archiveTakeCount,