File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 11use {
2- crate :: { api:: ApiState , state:: { aggregate:: Aggregates , cache:: Cache } } ,
2+ crate :: {
3+ api:: ApiState ,
4+ state:: { aggregate:: Aggregates , cache:: Cache } ,
5+ } ,
36 axum:: {
47 extract:: State ,
58 http:: StatusCode ,
2528 let state = & * state. state ;
2629 let ( aggregates_ready, metadata) = Aggregates :: is_ready ( state) . await ;
2730 let cache_ready = Cache :: is_cache_ready ( state) . await ;
28-
31+
2932 if aggregates_ready && cache_ready {
3033 ( StatusCode :: OK , "OK" ) . into_response ( )
3134 } else {
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ pub trait Cache {
136136 request_time : RequestTime ,
137137 filter : MessageStateFilter ,
138138 ) -> Result < Vec < MessageState > > ;
139- ///
139+ ///
140140 async fn is_cache_ready ( & self ) -> bool ;
141141}
142142
@@ -277,7 +277,7 @@ where
277277 Ok ( cache. get ( & slot) . cloned ( ) )
278278 }
279279
280- ///
280+ ///
281281 async fn is_cache_ready ( & self ) -> bool {
282282 let message_cache = self . into ( ) . message_cache . read ( ) . await ;
283283 !message_cache. is_empty ( )
You can’t perform that action at this time.
0 commit comments