diff --git a/src/main.rs b/src/main.rs index 9d791db..b9d0bff 100644 --- a/src/main.rs +++ b/src/main.rs @@ -110,6 +110,20 @@ async fn main() -> Result<(), Box> { pool.clone(), api_config.clone(), ); + let member_bank_deposit_event_handler = events::member_bank_deposit::event::EventHandler::new( + connection_server_broker.clone(), + queue_server_broker.clone(), + pool.clone(), + member_account_synchronizer.clone(), + api_config.clone(), + ); + let member_bank_withdraw_event_handler = events::member_bank_withdraw::event::EventHandler::new( + connection_server_broker.clone(), + queue_server_broker.clone(), + pool.clone(), + member_account_synchronizer.clone(), + api_config.clone(), + ); let mut sched = tokio_cron_scheduler::JobScheduler::new().await?; @@ -143,6 +157,8 @@ async fn main() -> Result<(), Box> { // member_account_service.subscribe(), // betting_service.subscribe(), member_event_handler.subscribe(), + member_bank_deposit_event_handler.subscribe(), + member_bank_withdraw_event_handler.subscribe(), )?; sched.shutdown().await?;