Skip to content

Commit

Permalink
refactor(config): Clarify logs and adjust control flow in listenQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
csulit committed Oct 30, 2024
1 parent 3721df6 commit 993c078
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/deno-kv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export async function listenQueue(kv: Deno.Kv) {
});

if (listingByUrl.rowCount && listingByUrl.rowCount > 0) {
console.info("Listing already exists");
console.info("Listing query by url already exists");

const updateListingResult = await transaction.queryObject({
args: [
Expand Down Expand Up @@ -439,7 +439,9 @@ export async function listenQueue(kv: Deno.Kv) {
});

if (listingByTitle.rowCount && listingByTitle.rowCount > 0) {
continue;
await transaction.commit()
console.log("Listing query by title already exists")
return;
}

let property;
Expand Down

0 comments on commit 993c078

Please sign in to comment.