Skip to content

Commit

Permalink
refactor(config): Comment out property update loop in listenQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
csulit committed Oct 25, 2024
1 parent d93aaa2 commit 45e00b1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions config/deno-kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -495,16 +495,16 @@ export async function listenQueue(kv: Deno.Kv) {
}

// Update all processed properties in transaction
for (const prop of processedProperty) {
await transaction.queryObject({
args: [prop.ai_generated_description, prop.id],
text: `UPDATE Property SET ai_generated_description = $1 WHERE id = $2`,
});

await transaction.commit();
}
// for (const prop of processedProperty) {
// await transaction.queryObject({
// args: [prop.ai_generated_description, prop.id],
// text: `UPDATE Property SET ai_generated_description = $1 WHERE id = $2`,
// });
// }
}

console.log(processedProperty);

await transaction.commit();
console.log("Transaction successfully committed for create");
// Reset processed properties after successful commit
Expand Down

0 comments on commit 45e00b1

Please sign in to comment.