pub struct TaskRefused {
pub workflow_id: Option<WorkflowId>,
pub activity_id: Option<ActivityId>,
pub reason: String,
pub completion_token: String,
}Expand description
A worker declining ONE pushed task because it has no free execution slot.
Not a failure and not an attempt. The server re-parks the dispatch with no clock started, corrects its own per-worker in-flight count, and re-selects; nothing is recorded against the activity and its attempt number is untouched.
With capacity on the wire the server should never push past a worker’s advertised concurrency, so this frame exists for the case where the two accountings have DRIFTED — a reconnect race, a redelivery joining an outstanding generation — and a drifted count must not become a false failure.
Deliberately distinct from the server’s own intake refusal: that is the server’s verdict about a channel it owns, this is the worker’s answer about its own admission. Two facts, two types.
Fields§
§workflow_id: Option<WorkflowId>Workflow whose activity is being declined.
activity_id: Option<ActivityId>Activity within that workflow, echoed from the ActivityTask.
reason: StringOperator-facing reason the worker declined, in the worker’s own words.
completion_token: StringVerbatim execution-generation token from the ActivityTask. Load-bearing: a refusal from a superseded generation must not re-park the attempt that superseded it, and the token is what the server’s fence checks that with.
Trait Implementations§
Source§impl Clone for TaskRefused
impl Clone for TaskRefused
Source§fn clone(&self) -> TaskRefused
fn clone(&self) -> TaskRefused
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TaskRefused
impl Debug for TaskRefused
Source§impl Default for TaskRefused
impl Default for TaskRefused
Source§impl<'de> Deserialize<'de> for TaskRefused
impl<'de> Deserialize<'de> for TaskRefused
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TaskRefused
Source§impl Hash for TaskRefused
impl Hash for TaskRefused
Source§impl Message for TaskRefused
impl Message for TaskRefused
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for TaskRefused
impl PartialEq for TaskRefused
Source§impl Serialize for TaskRefused
impl Serialize for TaskRefused
impl StructuralPartialEq for TaskRefused
Auto Trait Implementations§
impl Freeze for TaskRefused
impl RefUnwindSafe for TaskRefused
impl Send for TaskRefused
impl Sync for TaskRefused
impl Unpin for TaskRefused
impl UnsafeUnpin for TaskRefused
impl UnwindSafe for TaskRefused
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request