@@ -681,18 +681,11 @@ async fn monitor_output(output: OutputReceiver) {
681681/// it to progress to a terminal state.
682682async fn monitor_status ( app : LocalApp ) {
683683 debug ! ( "Starting status monitoring for LocalApp" ) ;
684- let mut check_count = 0 ;
685- let max_checks = 600 ; // 60 seconds with 100ms intervals
686684
687685 loop {
688- debug ! (
689- "Status check #{}, attempting to get app status" ,
690- check_count
691- ) ;
692-
693686 match app. status ( ) . await {
694687 Ok ( status) => {
695- debug ! ( "Got app status (some status)" ) ;
688+ debug ! ( "Got app status: {:?}" , status) ;
696689 match status {
697690 tower_runtime:: Status :: Exited => {
698691 debug ! ( "App exited cleanly, stopping status monitoring" ) ;
@@ -705,31 +698,13 @@ async fn monitor_status(app: LocalApp) {
705698 break ;
706699 }
707700 _ => {
708- debug ! ( "App status: other, continuing to monitor" ) ;
709- check_count += 1 ;
710- if check_count >= max_checks {
711- debug ! ( "Status monitoring timed out after {} checks" , max_checks) ;
712- output:: error (
713- "App status monitoring timed out, but app may still be running" ,
714- ) ;
715- break ;
716- }
701+ debug ! ( "App status: continuing to monitor" ) ;
717702 tokio:: time:: sleep ( std:: time:: Duration :: from_millis ( 100 ) ) . await ;
718- continue ;
719703 }
720704 }
721705 }
722706 Err ( e) => {
723707 debug ! ( "Failed to get app status: {:?}" , e) ;
724- check_count += 1 ;
725- if check_count >= max_checks {
726- debug ! (
727- "Failed to get app status after {} attempts, giving up" ,
728- max_checks
729- ) ;
730- output:: error ( "Failed to get app status after timeout" ) ;
731- break ;
732- }
733708 tokio:: time:: sleep ( std:: time:: Duration :: from_millis ( 100 ) ) . await ;
734709 }
735710 }
0 commit comments