Server tools to backfill, tail, mirror, and verify PLC logs
49
fork

Configure Feed

Select the types of activity you want to include in your feed.

use url from reqwest

save a direct dependency

phil 2de54b79 cbe85c05

+3 -5
-1
Cargo.lock
··· 47 47 "tokio-postgres", 48 48 "tokio-stream", 49 49 "tokio-util", 50 - "url", 51 50 ] 52 51 53 52 [[package]]
-1
Cargo.toml
··· 24 24 tokio-postgres = { version = "0.7.13", features = ["with-chrono-0_4", "with-serde_json-1"] } 25 25 tokio-stream = { version = "0.1.17", features = ["io-util"] } 26 26 tokio-util = { version = "0.7.16", features = ["compat"] } 27 - url = "2.5.7"
+1 -1
src/bin/allegedly.rs
··· 3 3 bin_init, pages_to_pg, pages_to_weeks, poll_upstream, 4 4 }; 5 5 use clap::{Parser, Subcommand}; 6 + use reqwest::Url; 6 7 use std::{path::PathBuf, time::Instant}; 7 8 use tokio::sync::{mpsc, oneshot}; 8 - use url::Url; 9 9 10 10 #[derive(Debug, Parser)] 11 11 struct Cli {
+1 -1
src/poll.rs
··· 1 1 use crate::{CLIENT, Dt, ExportPage, Op, OpKey}; 2 + use reqwest::Url; 2 3 use std::time::Duration; 3 4 use thiserror::Error; 4 5 use tokio::sync::mpsc; 5 - use url::Url; 6 6 7 7 // plc.directory ratelimit on /export is 500 per 5 mins 8 8 const UPSTREAM_REQUEST_INTERVAL: Duration = Duration::from_millis(600);
+1 -1
src/weekly.rs
··· 2 2 use async_compression::tokio::bufread::GzipDecoder; 3 3 use async_compression::tokio::write::GzipEncoder; 4 4 use core::pin::pin; 5 + use reqwest::Url; 5 6 use std::future::Future; 6 7 use std::ops::{Bound, RangeBounds}; 7 8 use std::path::PathBuf; ··· 12 13 }; 13 14 use tokio_stream::wrappers::LinesStream; 14 15 use tokio_util::compat::FuturesAsyncReadCompatExt; 15 - use url::Url; 16 16 17 17 const WEEK_IN_SECONDS: i64 = 7 * 86_400; 18 18