Created
September 19, 2022 19:25
-
-
Save jayhuang75/18d73c37d82cb7719a64a34d742fa358 to your computer and use it in GitHub Desktop.
rust_serverless_trading_view_main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[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