pub(super) struct VerifyPoll;Expand description
Polls the rows that have something to poll by.
Trait Implementations§
Source§impl RegistryBatchFlow for VerifyPoll
impl RegistryBatchFlow for VerifyPoll
Source§const REFUSAL: RefusalPolicy<VerifyAttempt>
const REFUSAL: RefusalPolicy<VerifyAttempt>
Deliberately not the shared request-level outcome: a failure to ask proves nothing was or
was not created, and moving the row towards failed_retryable would let an admin resubmit
it. The iteration still reports the refusal, and the gate still records it.
Source§async fn claim(
ctx: &BatchFlowContext<'_>,
conn: &mut PgConnection,
limit: usize,
) -> CreditRegistrationResult<Prepared<VerifyAttempt, VerificationRequest>>
async fn claim( ctx: &BatchFlowContext<'_>, conn: &mut PgConnection, limit: usize, ) -> CreditRegistrationResult<Prepared<VerifyAttempt, VerificationRequest>>
A row stuck without a submitted attainment id is leased like the rest, so it is not claimed again every iteration, but never sent; it is flagged for an admin and counted as failed.
Source§const ALL_UNAVAILABLE_ERROR: &'static str = "Every verify poll came back unavailable."
const ALL_UNAVAILABLE_ERROR: &'static str = "Every verify poll came back unavailable."
The iteration’s error when every item came back unavailable.
Source§type Extra = VerifyAttempt
type Extra = VerifyAttempt
What the claim read for each row alongside it, which its answer is applied with.
Source§type Request = VerificationRequest
type Request = VerificationRequest
What each row asks, which also names the operation it is asked under.
Source§async fn apply_answer(
conn: &mut PgConnection,
poll: &Claimed<VerifyAttempt>,
answer: Option<&VerificationAnswer>,
audit: &ExchangeAudit,
) -> CreditRegistrationResult<Applied>
async fn apply_answer( conn: &mut PgConnection, poll: &Claimed<VerifyAttempt>, answer: Option<&VerificationAnswer>, audit: &ExchangeAudit, ) -> CreditRegistrationResult<Applied>
Decides what one answer, or the absence of one, does to its row and writes it, with the
exchange behind it. May read and write in transactions of its own on the way.
Source§async fn keep_in_flight(
_conn: &mut PgConnection,
_rows: &[&Claimed<Self::Extra>],
) -> CreditRegistrationResult<()>
async fn keep_in_flight( _conn: &mut PgConnection, _rows: &[&Claimed<Self::Extra>], ) -> CreditRegistrationResult<()>
Called before each send after a split, with every row the split still holds, so the ones
waiting their turn are not taken for a worker that died mid-call.
Source§async fn release_unsent(
_conn: &mut PgConnection,
_rows: &[&Claimed<Self::Extra>],
) -> CreditRegistrationResult<()>
async fn release_unsent( _conn: &mut PgConnection, _rows: &[&Claimed<Self::Extra>], ) -> CreditRegistrationResult<()>
Called with every row a split still holds unsent when a shutdown or an error stops the
iteration, each of which would otherwise be condemned as a lost submission.
Auto Trait Implementations§
impl Freeze for VerifyPoll
impl RefUnwindSafe for VerifyPoll
impl Send for VerifyPoll
impl Sync for VerifyPoll
impl Unpin for VerifyPoll
impl UnsafeUnpin for VerifyPoll
impl UnwindSafe for VerifyPoll
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
Mutably borrows from an owned value. Read more
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered].§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ServiceExt for T
impl<T> ServiceExt for T
§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
§fn decompression(self) -> Decompression<Self>where
Self: Sized,
fn decompression(self) -> Decompression<Self>where
Self: Sized,
Decompress response bodies. Read more
§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more