A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
fix: depri mass admin actions
Mohamed Bassem9d15eef074f9
diff --git a/packages/trpc/routers/admin.ts b/packages/trpc/routers/admin.tsindex 31ecaedc..44a51cad 100644--- a/packages/trpc/routers/admin.ts+++ b/packages/trpc/routers/admin.ts@@ -217,10 +217,15 @@ export const adminAppRouter = router({await Promise.all(bookmarkIds.map((b) =>- LinkCrawlerQueue.enqueue({- bookmarkId: b.id,- runInference: input.runInference,- }),+ LinkCrawlerQueue.enqueue(+ {+ bookmarkId: b.id,+ runInference: input.runInference,+ },+ {+ priority: 50,+ },+ ),),);}),@@ -233,7 +238,13 @@ export const adminAppRouter = router({},});- await Promise.all(bookmarkIds.map((b) => triggerSearchReindex(b.id)));+ await Promise.all(+ bookmarkIds.map((b) =>+ triggerSearchReindex(b.id, {+ priority: 50,+ }),+ ),+ );}),reprocessAssetsFixMode: adminProcedure.mutation(async ({ ctx }) => {const bookmarkIds = await ctx.db.query.bookmarkAssets.findMany({@@ -244,10 +255,15 @@ export const adminAppRouter = router({await Promise.all(bookmarkIds.map((b) =>- AssetPreprocessingQueue.enqueue({- bookmarkId: b.id,- fixMode: true,- }),+ AssetPreprocessingQueue.enqueue(+ {+ bookmarkId: b.id,+ fixMode: true,+ },+ {+ priority: 50,+ },+ ),),);}),@@ -277,7 +293,12 @@ export const adminAppRouter = router({await Promise.all(bookmarkIds.map((b) =>- OpenAIQueue.enqueue({ bookmarkId: b.id, type: input.type }),+ OpenAIQueue.enqueue(+ { bookmarkId: b.id, type: input.type },+ {+ priority: 50,+ },+ ),),);}),