@@ -44,7 +44,7 @@ pub struct RuntimeBuilder {
4444 datasets_health_monitor_enabled : bool ,
4545 metrics_endpoint : Option < SocketAddr > ,
4646 prometheus_registry : Option < prometheus:: Registry > ,
47- runtime_status : Option < Arc < status:: RuntimeStatus > > ,
47+ runtime_status : Arc < status:: RuntimeStatus > ,
4848 rate_limits : Option < Arc < RateLimits > > ,
4949 accelerator_engine_registry : Arc < AcceleratorEngineRegistry > ,
5050 datafusion_configuration_fn : Option < DatafusionConfigurationCallback > ,
@@ -60,7 +60,7 @@ impl RuntimeBuilder {
6060 metrics_endpoint : None ,
6161 prometheus_registry : None ,
6262 autoload_extensions : HashMap :: new ( ) ,
63- runtime_status : None ,
63+ runtime_status : status :: RuntimeStatus :: new ( ) ,
6464 rate_limits : None ,
6565 accelerator_engine_registry : Arc :: new ( AcceleratorEngineRegistry :: new ( ) ) ,
6666 datafusion_configuration_fn : None ,
@@ -130,11 +130,6 @@ impl RuntimeBuilder {
130130 self
131131 }
132132
133- pub fn with_runtime_status ( mut self , runtime_status : Arc < status:: RuntimeStatus > ) -> Self {
134- self . runtime_status = Some ( runtime_status) ;
135- self
136- }
137-
138133 pub fn with_rate_limits ( mut self , rate_limits : RateLimits ) -> Self {
139134 self . rate_limits = Some ( Arc :: new ( rate_limits) ) ;
140135 self
@@ -147,13 +142,8 @@ impl RuntimeBuilder {
147142 tools:: factory:: register_all_factories ( ) . await ;
148143 document_parse:: register_all ( ) . await ;
149144
150- let status = match self . runtime_status {
151- Some ( status) => status,
152- None => status:: RuntimeStatus :: new ( ) ,
153- } ;
154-
155145 let mut df = DataFusion :: builder (
156- Arc :: clone ( & status ) ,
146+ Arc :: clone ( & self . runtime_status ) ,
157147 Arc :: clone ( & self . accelerator_engine_registry ) ,
158148 )
159149 . build ( ) ;
@@ -203,9 +193,9 @@ impl RuntimeBuilder {
203193 metrics_endpoint : self . metrics_endpoint ,
204194 prometheus_registry : self . prometheus_registry ,
205195 rate_limits : self . rate_limits . unwrap_or_default ( ) ,
206- status,
196+ status : self . runtime_status ,
207197 runtime_tasks : Arc :: new ( RwLock :: new ( HashMap :: new ( ) ) ) ,
208- accelerator_engine_registry : Arc :: clone ( & self . accelerator_engine_registry ) ,
198+ accelerator_engine_registry : self . accelerator_engine_registry ,
209199 } ;
210200
211201 let mut extensions: HashMap < String , Arc < dyn Extension > > = HashMap :: new ( ) ;
0 commit comments