From ccb19a7f7cfb6869d074ec937b7ab1edd4dc15ef Mon Sep 17 00:00:00 2001 From: Justin Chang Date: Fri, 11 Aug 2023 12:19:13 -0700 Subject: [PATCH] upsert --- .../nft-metadata-crawler-parser/src/worker.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ecosystem/nft-metadata-crawler-parser/src/worker.rs b/ecosystem/nft-metadata-crawler-parser/src/worker.rs index 534ee04ff2a17a..27bedd5ed5ccad 100644 --- a/ecosystem/nft-metadata-crawler-parser/src/worker.rs +++ b/ecosystem/nft-metadata-crawler-parser/src/worker.rs @@ -318,15 +318,15 @@ impl Worker { .ok(); self.model.set_cdn_json_uri(cdn_json_uri); } + } - // Commit model to Postgres - if let Err(e) = upsert_uris(&mut self.conn, self.model.clone()) { - error!( - last_transaction_version = self.last_transaction_version, - error = ?e, - "[NFT Metadata Crawler] Commit to Postgres failed" - ); - } + // Commit model to Postgres + if let Err(e) = upsert_uris(&mut self.conn, self.model.clone()) { + error!( + last_transaction_version = self.last_transaction_version, + error = ?e, + "[NFT Metadata Crawler] Commit to Postgres failed" + ); } // Deduplicate raw_image_uri