diff --git a/rfd-github/src/lib.rs b/rfd-github/src/lib.rs index 85563330..b5aaa3f1 100644 --- a/rfd-github/src/lib.rs +++ b/rfd-github/src/lib.rs @@ -269,7 +269,7 @@ impl GitHubRfdRepo { .await? .body; - tracing::info!(?rfd_files, "Fetched repo files"); + tracing::info!(count = ?rfd_files.len(), "Fetched repo files"); // Each RFD should exist at a path that looks like rfd/{number}/README.adoc for entry in rfd_files { diff --git a/rfd-processor/src/scanner.rs b/rfd-processor/src/scanner.rs index be22598b..f56496e2 100644 --- a/rfd-processor/src/scanner.rs +++ b/rfd-processor/src/scanner.rs @@ -2,7 +2,6 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. -use diesel::result::{DatabaseErrorKind, Error as DieselError}; use rfd_github::{GitHubError, GitHubRfdUpdate}; use rfd_model::{storage::JobStore, NewJob}; use std::sync::Arc; @@ -37,10 +36,7 @@ pub async fn scanner(ctx: Arc) -> Result<(), ScannerError> { Ok(job) => tracing::trace!(?job.id, "Added job to the queue"), Err(err) => { match err { - StoreError::Db(DieselError::DatabaseError( - DatabaseErrorKind::UniqueViolation, - _, - )) => { + StoreError::Conflict => { // Nothing to do here, we expect uniqueness conflicts. It is expected // that the scanner picks ups redundant jobs for RFDs that have not // changed since the last scan