diff --git a/front/app/src/lib/css/app.css b/front/app/src/lib/css/app.css index 5f9d5cf6..150fb83d 100644 --- a/front/app/src/lib/css/app.css +++ b/front/app/src/lib/css/app.css @@ -9,7 +9,10 @@ /* @import url("./circular/circular.css"); */ /* @import url("./mada/font.css"); */ + @import url("./sofia-sans/font.css"); +/* @import url("./brandon/font.css"); */ + @import url("./azeret-mono/azeret-mono.css"); /* @import url("./chivo-mono/chivo-mono.css"); */ diff --git a/front/app/src/lib/css/brandon/black.woff2 b/front/app/src/lib/css/brandon/black.woff2 new file mode 100644 index 00000000..3de964ba Binary files /dev/null and b/front/app/src/lib/css/brandon/black.woff2 differ diff --git a/front/app/src/lib/css/brandon/black_italic.woff2 b/front/app/src/lib/css/brandon/black_italic.woff2 new file mode 100644 index 00000000..8211eab4 Binary files /dev/null and b/front/app/src/lib/css/brandon/black_italic.woff2 differ diff --git a/front/app/src/lib/css/brandon/bold.woff2 b/front/app/src/lib/css/brandon/bold.woff2 new file mode 100644 index 00000000..e8aeb49c Binary files /dev/null and b/front/app/src/lib/css/brandon/bold.woff2 differ diff --git a/front/app/src/lib/css/brandon/bold_italic.woff2 b/front/app/src/lib/css/brandon/bold_italic.woff2 new file mode 100644 index 00000000..ac4e74f8 Binary files /dev/null and b/front/app/src/lib/css/brandon/bold_italic.woff2 differ diff --git a/front/app/src/lib/css/brandon/font.css b/front/app/src/lib/css/brandon/font.css new file mode 100644 index 00000000..b8386bc8 --- /dev/null +++ b/front/app/src/lib/css/brandon/font.css @@ -0,0 +1,83 @@ +@font-face { + font-family: Brandon; + font-style: normal; + font-weight: 200; + src: url("./thin.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: italic; + font-weight: 200; + src: url("./thin_italic.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: normal; + font-weight: 300; + src: url("./light.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: italic; + font-weight: 300; + src: url("./light_italic.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: normal; + font-weight: 400; + src: url("./regular.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: italic; + font-weight: 400; + src: url("./regular_italic.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: normal; + font-weight: 600; + src: url("./medium.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: italic; + font-weight: 600; + src: url("./medium_italic.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: normal; + font-weight: 700; + src: url("./bold.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: italic; + font-weight: 700; + src: url("./bold_italic.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: normal; + font-weight: 900; + src: url("./black.woff2") format('woff2'); +} + +@font-face { + font-family: Brandon; + font-style: italic; + font-weight: 900; + src: url("./black_italic.woff2") format('woff2'); +} \ No newline at end of file diff --git a/front/app/src/lib/css/brandon/light.woff2 b/front/app/src/lib/css/brandon/light.woff2 new file mode 100644 index 00000000..1f0f6be0 Binary files /dev/null and b/front/app/src/lib/css/brandon/light.woff2 differ diff --git a/front/app/src/lib/css/brandon/light_italic.woff2 b/front/app/src/lib/css/brandon/light_italic.woff2 new file mode 100644 index 00000000..0d896615 Binary files /dev/null and b/front/app/src/lib/css/brandon/light_italic.woff2 differ diff --git a/front/app/src/lib/css/brandon/medium.woff2 b/front/app/src/lib/css/brandon/medium.woff2 new file mode 100644 index 00000000..5d0d34b5 Binary files /dev/null and b/front/app/src/lib/css/brandon/medium.woff2 differ diff --git a/front/app/src/lib/css/brandon/medium_italic.woff2 b/front/app/src/lib/css/brandon/medium_italic.woff2 new file mode 100644 index 00000000..8a493581 Binary files /dev/null and b/front/app/src/lib/css/brandon/medium_italic.woff2 differ diff --git a/front/app/src/lib/css/brandon/regular.woff2 b/front/app/src/lib/css/brandon/regular.woff2 new file mode 100644 index 00000000..cfd030ad Binary files /dev/null and b/front/app/src/lib/css/brandon/regular.woff2 differ diff --git a/front/app/src/lib/css/brandon/regular_italic.woff2 b/front/app/src/lib/css/brandon/regular_italic.woff2 new file mode 100644 index 00000000..83ff62c0 Binary files /dev/null and b/front/app/src/lib/css/brandon/regular_italic.woff2 differ diff --git a/front/app/src/lib/css/brandon/thin.woff2 b/front/app/src/lib/css/brandon/thin.woff2 new file mode 100644 index 00000000..3eff1059 Binary files /dev/null and b/front/app/src/lib/css/brandon/thin.woff2 differ diff --git a/front/app/src/lib/css/brandon/thin_italic.woff2 b/front/app/src/lib/css/brandon/thin_italic.woff2 new file mode 100644 index 00000000..39bbc791 Binary files /dev/null and b/front/app/src/lib/css/brandon/thin_italic.woff2 differ diff --git a/front/app/src/lib/css/cera/cera.css b/front/app/src/lib/css/cera/font.css similarity index 100% rename from front/app/src/lib/css/cera/cera.css rename to front/app/src/lib/css/cera/font.css diff --git a/rs/packages/db/Cargo.toml b/rs/packages/db/Cargo.toml index 92bd14d1..e98c4172 100644 --- a/rs/packages/db/Cargo.toml +++ b/rs/packages/db/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" [features] default = ["analytics-max-concurrent"] +# default = [] analytics-max-concurrent = [] # do not enable this, is for internal benchmarking only diff --git a/rs/packages/media/src/handle/external_relay.rs b/rs/packages/media/src/handle/external_relay.rs index a15a8e90..ffb41bbc 100644 --- a/rs/packages/media/src/handle/external_relay.rs +++ b/rs/packages/media/src/handle/external_relay.rs @@ -167,6 +167,8 @@ pub fn run_external_relay_source( None => break, Some(Err(_e)) => break, Some(Ok(bytes)) => { + transfer.fetch_add(bytes.len(), Ordering::Relaxed); + match sender.send(bytes) { Ok(_) => { no_listeners_since = None; diff --git a/rs/packages/stream/src/lib.rs b/rs/packages/stream/src/lib.rs index 9d3bb95e..d338ecea 100644 --- a/rs/packages/stream/src/lib.rs +++ b/rs/packages/stream/src/lib.rs @@ -27,6 +27,7 @@ use std::net::SocketAddr; use std::sync::atomic::{AtomicU64, Ordering}; use std::sync::Arc; use std::time::{Instant, SystemTime}; +use tokio::time::{sleep, Duration}; use transfer_map::TransferTracer; mod error; @@ -451,23 +452,37 @@ impl StreamHandler { loop_i += 1; + let mut last_recv = Instant::now(); + 'recv: loop { - let r = rx.recv().await; + match rx.recv().await { + // Here the channel has been dropped + Err(RecvError::Closed) => break 'recv, - match r { // if lagged we ignore the error and continue with the oldest message buffered in the channel // TODO: maybe we should advance to the newest message with stream.resubscribe() - Err(RecvError::Lagged(_)) => continue 'recv, + Err(RecvError::Lagged(_)) => { + // break this receiver if lagged behind more than 1 minute + if last_recv.elapsed().as_millis() > 60_000 { + break 'root; + } - // Here the channel has been dropped - Err(RecvError::Closed) => break 'recv, + continue 'recv; + } // Receive bytes and pass it to response body Ok(bytes) => { rx_had_data = true; + last_recv = Instant::now(); let len = bytes.len(); - match body_sender.send_data(bytes).await { + + let r = tokio::select! { + _ = sleep(Duration::from_millis(60_000)) => break 'root, + r = body_sender.send_data(bytes) => r, + }; + + match r { Err(_) => break 'root, Ok(()) => { transfer_map.increment(&station.account_id, len);