@@ -4,6 +4,7 @@ use crate::api::routes::task::tasks_routes;
44use crate :: api:: routes:: { heartbeat:: heartbeat_routes, metrics:: metrics_routes} ;
55use crate :: models:: node:: NodeStatus ;
66use crate :: scheduler:: Scheduler ;
7+ use crate :: status_update:: plugins:: node_groups:: NodeGroupsPlugin ;
78use crate :: store:: core:: { RedisStore , StoreContext } ;
89use crate :: utils:: loop_heartbeats:: LoopHeartbeats ;
910use crate :: ServerMode ;
@@ -30,6 +31,7 @@ pub struct AppState {
3031 pub contracts : Option < Arc < Contracts > > ,
3132 pub pool_id : u32 ,
3233 pub scheduler : Scheduler ,
34+ pub node_groups_plugin : Option < Arc < NodeGroupsPlugin > > ,
3335}
3436
3537#[ allow( clippy:: too_many_arguments) ]
@@ -48,6 +50,7 @@ pub async fn start_server(
4850 pool_id : u32 ,
4951 server_mode : ServerMode ,
5052 scheduler : Scheduler ,
53+ node_groups_plugin : Option < Arc < NodeGroupsPlugin > > ,
5154) -> Result < ( ) , Error > {
5255 info ! ( "Starting server at http://{}:{}" , host, port) ;
5356 let app_state = Data :: new ( AppState {
@@ -61,6 +64,7 @@ pub async fn start_server(
6164 contracts,
6265 pool_id,
6366 scheduler,
67+ node_groups_plugin,
6468 } ) ;
6569 let node_store = app_state. store_context . node_store . clone ( ) ;
6670 let node_store_clone = node_store. clone ( ) ;
0 commit comments