···4mod client;
5mod plc_pg;
6mod poll;
078pub use backfill::week_to_pages;
9pub use client::CLIENT;
10pub use plc_pg::Db;
11-pub use poll::poll_upstream;
01213pub type Dt = chrono::DateTime<chrono::Utc>;
14
···4mod client;
5mod plc_pg;
6mod poll;
7+mod weekly;
89pub use backfill::week_to_pages;
10pub use client::CLIENT;
11pub use plc_pg::Db;
12+pub use poll::{get_page, poll_upstream};
13+pub use weekly::{Week, pages_to_weeks};
1415pub type Dt = chrono::DateTime<chrono::Utc>;
16
+9-2
src/poll.rs
···18/// we assume that the order will at least be deterministic: this may be unsound
19#[derive(Debug, PartialEq)]
20pub struct LastOp {
21- created_at: Dt, // any op greater is definitely not duplicated
22 pk: (String, String), // did, cid
23}
24···117 page.only_after_last(pl);
118 }
119 if !page.is_empty() {
120- dest.send_async(page).await?;
0000000121 }
122123 prev_last = next_last.or(prev_last);
···18/// we assume that the order will at least be deterministic: this may be unsound
19#[derive(Debug, PartialEq)]
20pub struct LastOp {
21+ pub created_at: Dt, // any op greater is definitely not duplicated
22 pk: (String, String), // did, cid
23}
24···117 page.only_after_last(pl);
118 }
119 if !page.is_empty() {
120+ match dest.try_send(page) {
121+ Ok(()) => {}
122+ Err(flume::TrySendError::Full(page)) => {
123+ log::warn!("export: destination channel full, awaiting...");
124+ dest.send_async(page).await?;
125+ }
126+ e => e?,
127+ };
128 }
129130 prev_last = next_last.or(prev_last);