mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 10:06:32 +08:00 
			
		
		
		
	feat(router): add expand attempts support in payments retrieve response (#1678)
This commit is contained in:
		 Sai Harsha Vardhan
					Sai Harsha Vardhan
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							a6645bd354
						
					
				
				
					commit
					8572f1da8e
				
			| @ -11,6 +11,17 @@ pub fn generate_hscan_pattern_for_refund(sk: &str) -> String { | ||||
|         .join("_") | ||||
| } | ||||
|  | ||||
| #[cfg(feature = "kv_store")] | ||||
| /// Generates hscan field pattern. Suppose the field is pa_1234 it will generate | ||||
| /// pa_* | ||||
| pub fn generate_hscan_pattern_for_attempt(sk: &str) -> String { | ||||
|     sk.split('_') | ||||
|         .take(1) | ||||
|         .chain(["*"]) | ||||
|         .collect::<Vec<&str>>() | ||||
|         .join("_") | ||||
| } | ||||
|  | ||||
| // The first argument should be a future while the second argument should be a closure that returns a future for a database call | ||||
| pub async fn try_redis_get_else_try_database_get<F, RFut, DFut, T>( | ||||
|     redis_fut: RFut, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user