Explicitly emit INFO events in stop_io()

This commit is contained in:
link2xt
2023-01-20 13:27:19 +00:00
parent dab288936a
commit 8c660ad828
2 changed files with 2 additions and 2 deletions

View File

@@ -262,7 +262,7 @@ impl Accounts {
pub async fn stop_io(&self) {
// Sending an event here wakes up event loop even
// if there are no accounts.
info!(self, "Stopping IO for all accounts.");
self.emit_event(EventType::Info("Stopping IO for all accounts.".to_string()));
for account in self.accounts.values() {
account.stop_io().await;
}

View File

@@ -79,7 +79,7 @@ impl SchedulerState {
// For this, the caller needs to instruct the event poller
// to terminate on receiving the next event and then call stop_io()
// which will emit the below event(s)
info!(context, "stopping IO");
context.emit_event(EventType::Info("Stopping IO.".to_string()));
if let Some(debug_logging) = context.debug_logging.read().await.as_ref() {
debug_logging.loop_handle.abort();
}