fix rag worker queries

This commit is contained in:
Ramnique Singh 2025-05-07 11:43:13 +05:30 committed by akhisud3195
parent 070dfa7a9b
commit bdc7f01ea2
3 changed files with 3 additions and 0 deletions

View file

@ -216,6 +216,7 @@ async function runDeletionPipeline(_logger: PrefixLogger, job: WithId<z.infer<ty
// first try to find a job that needs deleting
job = await dataSourcesCollection.findOneAndUpdate({
status: "deleted",
"data.type": { $in: ["files_local", "files_s3"] },
$or: [
{ attempts: { $exists: false } },
{ attempts: { $lte: 3 } }

View file

@ -118,6 +118,7 @@ async function runDeletionPipeline(_logger: PrefixLogger, job: WithId<z.infer<ty
// first try to find a job that needs deleting
job = await dataSourcesCollection.findOneAndUpdate({
status: "deleted",
"data.type": "text",
$or: [
{ attempts: { $exists: false } },
{ attempts: { $lte: 3 } }

View file

@ -149,6 +149,7 @@ async function runDeletionPipeline(_logger: PrefixLogger, job: WithId<z.infer<ty
// first try to find a job that needs deleting
job = await dataSourcesCollection.findOneAndUpdate({
status: "deleted",
"data.type": "urls",
$or: [
{ attempts: { $exists: false } },
{ attempts: { $lte: 3 } }