mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 01:57:45 +08:00 
			
		
		
		
	refactor(drainer): removed router dependency from drainer (#209)
This commit is contained in:
		| @ -1,5 +1,4 @@ | ||||
| use drainer::{errors::DrainerResult, start_drainer}; | ||||
| use router::configs::settings; | ||||
| use drainer::{errors::DrainerResult, services, settings, start_drainer}; | ||||
| use structopt::StructOpt; | ||||
|  | ||||
| #[tokio::main] | ||||
| @ -8,13 +7,13 @@ async fn main() -> DrainerResult<()> { | ||||
|     let cmd_line = settings::CmdLineConf::from_args(); | ||||
|     let conf = settings::Settings::with_config_path(cmd_line.config_path).unwrap(); | ||||
|  | ||||
|     let store = router::services::Store::new(&conf, false).await; | ||||
|     let store = services::Store::new(&conf, false).await; | ||||
|     let store = std::sync::Arc::new(store); | ||||
|  | ||||
|     let number_of_drainers = conf.drainer.num_partitions; | ||||
|     let number_of_streams = store.config.drainer_num_partitions; | ||||
|     let max_read_count = conf.drainer.max_read_count; | ||||
|  | ||||
|     start_drainer(store, number_of_drainers, max_read_count).await?; | ||||
|     start_drainer(store, number_of_streams, max_read_count).await?; | ||||
|  | ||||
|     Ok(()) | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Abhishek
					Abhishek