summaryrefslogtreecommitdiffstats
path: root/rust/src
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src')
-rw-r--r--rust/src/api_entity_crud.rs2
-rw-r--r--rust/src/bin/fatcat-export.rs12
-rw-r--r--rust/src/database_models.rs8
-rw-r--r--rust/src/database_schema.rs4
4 files changed, 13 insertions, 13 deletions
diff --git a/rust/src/api_entity_crud.rs b/rust/src/api_entity_crud.rs
index 19817540..cab6f58f 100644
--- a/rust/src/api_entity_crud.rs
+++ b/rust/src/api_entity_crud.rs
@@ -1334,7 +1334,7 @@ impl EntityCrud for WebcaptureEntity {
.map(|c| WebcaptureRevCdxNewRow {
webcapture_rev: *rev_id,
surt: c.surt.clone(),
- timestamp: c.timestamp,
+ timestamp: c.timestamp.clone(),
url: c.url.clone(),
mimetype: c.mimetype.clone(),
status_code: c.status_code,
diff --git a/rust/src/bin/fatcat-export.rs b/rust/src/bin/fatcat-export.rs
index 8b7c4442..ec66ed4c 100644
--- a/rust/src/bin/fatcat-export.rs
+++ b/rust/src/bin/fatcat-export.rs
@@ -207,12 +207,12 @@ pub fn do_export(
ExportEntityType::File => {
thread::spawn(move || loop_work_file(row_receiver, output_sender, &db_conn, expand))
}
- ExportEntityType::Fileset => {
- thread::spawn(move || loop_work_fileset(row_receiver, output_sender, &db_conn, expand))
- }
- ExportEntityType::Webcapture=> {
- thread::spawn(move || loop_work_webcapture(row_receiver, output_sender, &db_conn, expand))
- }
+ ExportEntityType::Fileset => thread::spawn(move || {
+ loop_work_fileset(row_receiver, output_sender, &db_conn, expand)
+ }),
+ ExportEntityType::Webcapture => thread::spawn(move || {
+ loop_work_webcapture(row_receiver, output_sender, &db_conn, expand)
+ }),
ExportEntityType::Release => thread::spawn(move || {
loop_work_release(row_receiver, output_sender, &db_conn, expand)
}),
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs
index c913b98e..d2f6c3c2 100644
--- a/rust/src/database_models.rs
+++ b/rust/src/database_models.rs
@@ -305,10 +305,10 @@ pub struct WebcaptureRevCdxRow {
pub id: i64,
pub webcapture_rev: Uuid,
pub surt: String,
- pub timestamp: i64,
+ pub timestamp: String,
pub url: String,
pub mimetype: Option<String>,
- pub status_code: i64,
+ pub status_code: Option<i64>,
pub sha1: String,
pub sha256: Option<String>,
}
@@ -318,10 +318,10 @@ pub struct WebcaptureRevCdxRow {
pub struct WebcaptureRevCdxNewRow {
pub webcapture_rev: Uuid,
pub surt: String,
- pub timestamp: i64,
+ pub timestamp: String,
pub url: String,
pub mimetype: Option<String>,
- pub status_code: i64,
+ pub status_code: Option<i64>,
pub sha1: String,
pub sha256: Option<String>,
}
diff --git a/rust/src/database_schema.rs b/rust/src/database_schema.rs
index 436f2989..5db14de5 100644
--- a/rust/src/database_schema.rs
+++ b/rust/src/database_schema.rs
@@ -330,10 +330,10 @@ table! {
id -> Int8,
webcapture_rev -> Uuid,
surt -> Text,
- timestamp -> Int8,
+ timestamp -> Text,
url -> Text,
mimetype -> Nullable<Text>,
- status_code -> Int8,
+ status_code -> Nullable<Int8>,
sha1 -> Text,
sha256 -> Nullable<Text>,
}