Browse Source

Make op queue full error a warning

tags/v0.0.0-test.4
haixuanTao 3 years ago
parent
commit
b1c25e19e7
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      binaries/runtime/src/operator/mod.rs

+ 7
- 3
binaries/runtime/src/operator/mod.rs View File

@@ -1,6 +1,7 @@
use dora_core::descriptor::{OperatorDefinition, OperatorSource};
use dora_node_api::config::DataId;
use eyre::{eyre, Context};
use log::warn;
use std::any::Any;
use tokio::sync::mpsc::{self, Sender};

@@ -56,9 +57,12 @@ impl Operator {
)
})?
.try_send(OperatorInput { id, value })
.map_err(|err| match err {
tokio::sync::mpsc::error::TrySendError::Closed(_) => eyre!("operator crashed"),
tokio::sync::mpsc::error::TrySendError::Full(_) => eyre!("operator queue full"),
.or_else(|err| match err {
tokio::sync::mpsc::error::TrySendError::Closed(_) => Err(eyre!("operator crashed")),
tokio::sync::mpsc::error::TrySendError::Full(_) => {
warn!("operator queue full");
Ok(())
}
})
}



Loading…
Cancel
Save