diff --git a/config/deno-kv.ts b/config/deno-kv.ts index 8df9c7c..898a03b 100644 --- a/config/deno-kv.ts +++ b/config/deno-kv.ts @@ -209,21 +209,23 @@ export async function listenQueue(kv: Deno.Kv) { if (priceNotShown) { await transaction.queryObject({ args: [rawProperty.full_url, rawProperty.raw_title], - text: `UPDATE listing SET price_not_shown = TRUE WHERE url = $1 OR title = $2`, - }); - - await transaction.queryObject({ - args: [rawProperty.id], - text: `UPDATE lamudi_raw_data SET price_not_shown_is_process = TRUE WHERE id = $1`, + text: + `UPDATE listing SET price_not_shown = TRUE WHERE url = $1 OR title = $2`, }); } + await transaction.queryObject({ + args: [rawProperty.id], + text: + `UPDATE lamudi_raw_data SET price_not_shown_is_process = TRUE WHERE id = $1`, + }); + // try { // let region = await client2.queryObject({ // args: [rawProperty.listing_region_id, rawProperty.region], // text: ` - // SELECT id, listing_region_id - // FROM Listing_Region + // SELECT id, listing_region_id + // FROM Listing_Region // WHERE listing_region_id = $1 OR region = $2 // `, // }); @@ -321,7 +323,7 @@ export async function listenQueue(kv: Deno.Kv) { // // Verify records exist after creation // const verifyRegion = await client2.queryObject(` - // SELECT id FROM Listing_Region + // SELECT id FROM Listing_Region // WHERE listing_region_id = '${rawProperty.listing_region_id}' // `); // const verifyCity = await client2.queryObject(` @@ -371,7 +373,7 @@ export async function listenQueue(kv: Deno.Kv) { // const listingByUrl = await client2.queryObject