@@ -570,7 +570,7 @@ impl AirflowRole {
570570 command. extend ( Self :: authentication_start_commands ( auth_config) ) ;
571571 command. extend ( vec ! [
572572 "prepare_signal_handlers" . to_string( ) ,
573- format! ( "containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &" ) ,
573+ container_debug_command ( ) ,
574574 "airflow api-server &" . to_string( ) ,
575575 ] ) ;
576576 }
@@ -585,17 +585,13 @@ impl AirflowRole {
585585 --role \" Admin\" "
586586 . to_string( ) ,
587587 "prepare_signal_handlers" . to_string( ) ,
588- format!(
589- "containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &"
590- ) ,
588+ container_debug_command( ) ,
591589 "airflow dag-processor &" . to_string( ) ,
592590 "airflow scheduler &" . to_string( ) ,
593591 ] ) ,
594592 AirflowRole :: Worker => command. extend ( vec ! [
595593 "prepare_signal_handlers" . to_string( ) ,
596- format!(
597- "containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &"
598- ) ,
594+ container_debug_command( ) ,
599595 "airflow celery worker &" . to_string( ) ,
600596 ] ) ,
601597 }
@@ -606,7 +602,7 @@ impl AirflowRole {
606602 command. extend ( Self :: authentication_start_commands ( auth_config) ) ;
607603 command. extend ( vec ! [
608604 "prepare_signal_handlers" . to_string( ) ,
609- format! ( "containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &" ) ,
605+ container_debug_command ( ) ,
610606 "airflow webserver &" . to_string( ) ,
611607 ] ) ;
612608 }
@@ -623,16 +619,12 @@ impl AirflowRole {
623619 --role \" Admin\" "
624620 . to_string( ) ,
625621 "prepare_signal_handlers" . to_string( ) ,
626- format!(
627- "containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &"
628- ) ,
622+ container_debug_command( ) ,
629623 "airflow scheduler &" . to_string( ) ,
630624 ] ) ,
631625 AirflowRole :: Worker => command. extend ( vec ! [
632626 "prepare_signal_handlers" . to_string( ) ,
633- format!(
634- "containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &"
635- ) ,
627+ container_debug_command( ) ,
636628 "airflow celery worker &" . to_string( ) ,
637629 ] ) ,
638630 }
@@ -698,6 +690,10 @@ impl AirflowRole {
698690 }
699691}
700692
693+ fn container_debug_command ( ) -> String {
694+ format ! ( "containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &" )
695+ }
696+
701697#[ derive( Clone , Debug , Deserialize , Display , JsonSchema , PartialEq , Serialize ) ]
702698pub enum AirflowExecutor {
703699 /// The celery executor.
0 commit comments