fixed critical stall bug on first card
This commit is contained in:
parent
aa4559be2a
commit
6cd610e727
3 changed files with 11 additions and 13 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -1,8 +1,6 @@
|
|||
use dotenv;
|
||||
use tokio::time::Duration;
|
||||
use prometheus::Registry;
|
||||
use tracing::info;
|
||||
use std::sync::Arc;
|
||||
|
||||
mod server;
|
||||
mod cards;
|
||||
|
|
@ -11,7 +9,7 @@ mod handlers;
|
|||
mod util;
|
||||
|
||||
use server::run_server;
|
||||
use cards::{CARD_VALUES,get_data_update_interval};
|
||||
use cards::{setup_registry, get_data_update_interval};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
|
@ -33,9 +31,3 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
cards::process_cards(&mut interval).await?;
|
||||
}
|
||||
}
|
||||
|
||||
fn setup_registry() -> Result<Arc<Registry>, Box<dyn std::error::Error>> {
|
||||
let registry = Arc::new(Registry::new());
|
||||
registry.register(Box::new(CARD_VALUES.clone())).unwrap();
|
||||
Ok(registry)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue