Skip to content

Commit

Permalink
blop
Browse files Browse the repository at this point in the history
  • Loading branch information
fulmicoton committed Jan 24, 2024
1 parent cd7ef54 commit e6f7c67
Show file tree
Hide file tree
Showing 11 changed files with 167 additions and 101 deletions.
118 changes: 53 additions & 65 deletions quickwit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions quickwit/quickwit-actors/src/actor_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl<A: Actor> ActorContext<A> {
self.progress.record_progress();
}

pub(crate) fn state(&self) -> ActorState {
pub fn state(&self) -> ActorState {
self.actor_state.get_state()
}

Expand All @@ -199,7 +199,7 @@ impl<A: Actor> ActorContext<A> {
self.actor_state.idle();
}

pub(crate) fn pause(&self) {
pub fn pause(&self) {
self.actor_state.pause();
}

Expand Down
19 changes: 11 additions & 8 deletions quickwit/quickwit-actors/src/scheduler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,19 @@ pub fn start_scheduler() -> SchedulerClient {
}),
};
let mut scheduler = Scheduler::new(&scheduler_client);
tokio::spawn(async move {
while let Ok(scheduler_message) = rx.recv_async().await {
match scheduler_message {
SchedulerMessage::ProcessTime => scheduler.process_time(),
SchedulerMessage::Schedule { callback, timeout } => {
scheduler.process_schedule(callback, timeout);
quickwit_common::spawn_named_task(
async move {
while let Ok(scheduler_message) = rx.recv_async().await {
match scheduler_message {
SchedulerMessage::ProcessTime => scheduler.process_time(),
SchedulerMessage::Schedule { callback, timeout } => {
scheduler.process_schedule(callback, timeout);
}
}
}
}
});
},
"Scheduler",
);
scheduler_client
}

Expand Down
Loading

0 comments on commit e6f7c67

Please sign in to comment.