@@ -589,6 +589,14 @@ impl AtomicEoaExecutorStore {
589589 pipeline. hset ( & tx_data_key, "failure_reason" , error. to_string ( ) ) ;
590590 pipeline. hset ( & tx_data_key, "status" , "failed" ) ;
591591
592+ // Add TTL expiration
593+ let ttl_seconds = self . completed_transaction_ttl_seconds as i64 ;
594+ pipeline. expire ( & tx_data_key, ttl_seconds) ;
595+ pipeline. expire (
596+ & self . transaction_attempts_list_name ( & pending_transaction. transaction_id ) ,
597+ ttl_seconds,
598+ ) ;
599+
592600 let event = EoaExecutorEvent {
593601 transaction_id : pending_transaction. transaction_id . clone ( ) ,
594602 address : pending_transaction. user_request . from ,
@@ -657,6 +665,14 @@ impl AtomicEoaExecutorStore {
657665 pipeline. hset ( & tx_data_key, "completed_at" , now) ;
658666 pipeline. hset ( & tx_data_key, "failure_reason" , error. to_string ( ) ) ;
659667 pipeline. hset ( & tx_data_key, "status" , "failed" ) ;
668+
669+ // Add TTL expiration
670+ let ttl_seconds = self . completed_transaction_ttl_seconds as i64 ;
671+ pipeline. expire ( & tx_data_key, ttl_seconds) ;
672+ pipeline. expire (
673+ & self . transaction_attempts_list_name ( & pending_transaction. transaction_id ) ,
674+ ttl_seconds,
675+ ) ;
660676 }
661677
662678 // Queue webhooks for all failures
@@ -715,6 +731,7 @@ impl AtomicEoaExecutorStore {
715731 keys : & self . keys ,
716732 webhook_queue,
717733 eoa_metrics : & self . eoa_metrics ,
734+ completed_transaction_ttl_seconds : self . store . completed_transaction_ttl_seconds ,
718735 } )
719736 . await
720737 }
@@ -732,6 +749,7 @@ impl AtomicEoaExecutorStore {
732749 keys : & self . keys ,
733750 webhook_queue,
734751 eoa_metrics : & self . eoa_metrics ,
752+ completed_transaction_ttl_seconds : self . store . completed_transaction_ttl_seconds ,
735753 } )
736754 . await
737755 }
0 commit comments