mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	refactor(drainer): change logic for trimming the stream and refactor for modularity (#3128)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
		| @ -15,11 +15,6 @@ async fn main() -> DrainerResult<()> { | ||||
|     let store = services::Store::new(&conf, false).await; | ||||
|     let store = std::sync::Arc::new(store); | ||||
|  | ||||
|     let number_of_streams = store.config.drainer_num_partitions; | ||||
|     let max_read_count = conf.drainer.max_read_count; | ||||
|     let shutdown_intervals = conf.drainer.shutdown_interval; | ||||
|     let loop_interval = conf.drainer.loop_interval; | ||||
|  | ||||
|     #[cfg(feature = "vergen")] | ||||
|     println!("Starting drainer (Version: {})", router_env::git_tag!()); | ||||
|  | ||||
| @ -32,14 +27,7 @@ async fn main() -> DrainerResult<()> { | ||||
|     logger::debug!(startup_config=?conf); | ||||
|     logger::info!("Drainer started [{:?}] [{:?}]", conf.drainer, conf.log); | ||||
|  | ||||
|     start_drainer( | ||||
|         store.clone(), | ||||
|         number_of_streams, | ||||
|         max_read_count, | ||||
|         shutdown_intervals, | ||||
|         loop_interval, | ||||
|     ) | ||||
|     .await?; | ||||
|     start_drainer(store.clone(), conf.drainer).await?; | ||||
|  | ||||
|     Ok(()) | ||||
| } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Kartikeya Hegde
					Kartikeya Hegde