Remove dead time_based_key_fn from SQS lambda example
@@ -8,7 +8,6 @@ extern crate tokio;
use std::error::Error;
use std::io::{Cursor, Stdout};
-use std::time::{SystemTime, UNIX_EPOCH};
use prost::Message;
use rusoto_s3::S3Client;
@@ -193,17 +192,6 @@ fn init_s3_client() -> S3Client {
})
}
-fn time_based_key_fn(_event: &[u8]) -> String {
- let cur_ms = match SystemTime::now().duration_since(UNIX_EPOCH) {
- Ok(n) => n.as_millis(),
- Err(_) => panic!("SystemTime before UNIX EPOCH!"),
- };
-
- let cur_day = cur_ms - (cur_ms % 86400);
-
- format!("{}/{}-{}", cur_day, cur_ms, uuid::Uuid::new_v4())
-}
-
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let filter = EnvFilter::from_default_env();
