Skip to content

Instantly share code, notes, and snippets.

@jayhuang75
Created September 19, 2022 19:25
Show Gist options
  • Save jayhuang75/18d73c37d82cb7719a64a34d742fa358 to your computer and use it in GitHub Desktop.
Save jayhuang75/18d73c37d82cb7719a64a34d742fa358 to your computer and use it in GitHub Desktop.
rust_serverless_trading_view_main
#[tokio::main]
async fn main() -> Result<(), AppError> {
// load env
dotenv().ok();
// The runtime logging can be enabled here by initializing `tracing` with `tracing-subscriber`
// While `tracing` is used internally, `log` can be used as well if preferred.
tracing_subscriber::fmt()
.with_max_level(tracing::Level::INFO)
// disabling time is handy because CloudWatch will add the ingestion time.
.without_time()
.init();
let mut new_proccessor = Proccessor::new().await.unwrap();
let insert_num = new_proccessor.run().await?;
info!("we process {} records", insert_num);
Ok(())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment