db: log into epoch instead of date files

This commit is contained in:
Vincent Breitmoser 2021-07-20 12:47:00 +02:00
parent adc00fa469
commit 4b18a96fa0
3 changed files with 2 additions and 6 deletions

1
Cargo.lock generated
View File

@ -844,7 +844,6 @@ version = "0.1.0"
dependencies = [ dependencies = [
"anyhow 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)", "anyhow 1.0.34 (registry+https://github.com/rust-lang/crates.io-index)",
"base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)",
"fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", "fs2 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
"hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -21,7 +21,6 @@ pathdiff = "0.1"
idna = "0.1" idna = "0.1"
fs2 = "0.4" fs2 = "0.4"
walkdir = "2.2" walkdir = "2.2"
chrono = "0.4"
zbase32 = "0.1.2" zbase32 = "0.1.2"
[lib] [lib]

View File

@ -6,8 +6,6 @@ use std::str::FromStr;
use openpgp::serialize::SerializeInto; use openpgp::serialize::SerializeInto;
use chrono::prelude::Utc;
#[macro_use] #[macro_use]
extern crate anyhow; extern crate anyhow;
use anyhow::Result; use anyhow::Result;
@ -24,7 +22,6 @@ extern crate time;
extern crate url; extern crate url;
extern crate hex; extern crate hex;
extern crate walkdir; extern crate walkdir;
extern crate chrono;
extern crate zbase32; extern crate zbase32;
use tempfile::NamedTempFile; use tempfile::NamedTempFile;
@ -39,6 +36,7 @@ use openpgp::{
pub mod types; pub mod types;
use types::{Email, Fingerprint, KeyID}; use types::{Email, Fingerprint, KeyID};
use updates::Epoch;
pub mod wkd; pub mod wkd;
pub mod sync; pub mod sync;
@ -347,7 +345,7 @@ pub trait Database: Sync + Send {
} }
fn get_current_log_filename(&self) -> String { fn get_current_log_filename(&self) -> String {
Utc::now().format("%Y-%m-%d").to_string() Epoch::current().expect("not the end of time").to_string()
} }
fn get_tpk_status(&self, fpr_primary: &Fingerprint, known_addresses: &[Email]) -> Result<TpkStatus> { fn get_tpk_status(&self, fpr_primary: &Fingerprint, known_addresses: &[Email]) -> Result<TpkStatus> {