@@ -804,6 +804,10 @@ impl LDNApplication {
804
804
) ;
805
805
806
806
if let Ok ( application_file) = LDNApplication :: single_active ( pr_number) . await {
807
+ if application_file. lifecycle . get_active_status ( ) == false {
808
+ log:: info!( "No trigger to validate. Application lifecycle is inactive so the Total DC was reached." ) ;
809
+ return Ok ( true ) ;
810
+ }
807
811
let validated_by = application_file. lifecycle . validated_by . clone ( ) ;
808
812
let validated_at = application_file. lifecycle . validated_at . clone ( ) ;
809
813
let app_state = application_file. lifecycle . get_state ( ) ;
@@ -947,7 +951,12 @@ impl LDNApplication {
947
951
log:: info!( "Validating approval for PR number {}" , pr_number) ;
948
952
match LDNApplication :: single_active ( pr_number) . await {
949
953
Ok ( application_file) => {
954
+ if application_file. lifecycle . get_active_status ( ) == false {
955
+ log:: info!( "No approval to validate. Application lifecycle is inactive so the Total DC was reached." ) ;
956
+ return Ok ( true ) ;
957
+ }
950
958
let app_state: AppState = application_file. lifecycle . get_state ( ) ;
959
+
951
960
log:: info!( "- App state is {:?}" , app_state. as_str( ) ) ;
952
961
if app_state < AppState :: Granted {
953
962
log:: warn!( "- State is less than Granted" ) ;
@@ -1001,6 +1010,10 @@ impl LDNApplication {
1001
1010
log:: info!( "- Validating proposal for PR number {}" , pr_number) ;
1002
1011
match LDNApplication :: single_active ( pr_number) . await {
1003
1012
Ok ( application_file) => {
1013
+ if application_file. lifecycle . get_active_status ( ) == false {
1014
+ log:: info!( "No proposal to validate. Application lifecycle is inactive so the Total DC was reached." ) ;
1015
+ return Ok ( true ) ;
1016
+ }
1004
1017
let app_state: AppState = application_file. lifecycle . get_state ( ) ;
1005
1018
log:: info!( "- App state is {:?}" , app_state. as_str( ) ) ;
1006
1019
if app_state < AppState :: StartSignDatacap {
0 commit comments