File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
quickwit/quickwit-indexing/src/actors Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1032,6 +1032,7 @@ mod tests {
1032
1032
} ;
1033
1033
1034
1034
use super :: * ;
1035
+ use crate :: actors:: merge_pipeline:: SUPERVISE_LOOP_INTERVAL ;
1035
1036
1036
1037
async fn spawn_indexing_service_for_test (
1037
1038
data_dir_path : & Path ,
@@ -1605,7 +1606,7 @@ mod tests {
1605
1606
let observation = indexing_server_handle. process_pending_and_observe ( ) . await ;
1606
1607
assert_eq ! ( observation. num_running_pipelines, 0 ) ;
1607
1608
assert_eq ! ( observation. num_running_merge_pipelines, 0 ) ;
1608
- universe. sleep ( * HEARTBEAT ) . await ;
1609
+ universe. sleep ( SUPERVISE_LOOP_INTERVAL ) . await ;
1609
1610
// Check that the merge pipeline is also shut down as they are no more indexing pipeilne on
1610
1611
// the index.
1611
1612
assert ! ( universe. get_one:: <MergePipeline >( ) . is_none( ) ) ;
Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ static SPAWN_PIPELINE_SEMAPHORE: Semaphore = Semaphore::const_new(10);
69
69
#[ derive( Debug , Clone , Copy ) ]
70
70
pub struct FinishPendingMergesAndShutdownPipeline ;
71
71
72
+ pub const SUPERVISE_LOOP_INTERVAL : Duration = Duration :: from_secs ( 1 ) ;
73
+
72
74
struct MergePipelineHandles {
73
75
merge_planner : ActorHandle < MergePlanner > ,
74
76
merge_split_downloader : ActorHandle < MergeSplitDownloader > ,
@@ -480,7 +482,7 @@ impl Handler<SuperviseLoop> for MergePipeline {
480
482
) -> Result < ( ) , ActorExitStatus > {
481
483
self . perform_observe ( ) . await ;
482
484
self . perform_health_check ( ctx) . await ?;
483
- ctx. schedule_self_msg ( Duration :: from_secs ( 1 ) , supervise_loop_token) ;
485
+ ctx. schedule_self_msg ( SUPERVISE_LOOP_INTERVAL , supervise_loop_token) ;
484
486
Ok ( ( ) )
485
487
}
486
488
}
You can’t perform that action at this time.
0 commit comments