Skip to content

Simplify the SubgraphRunner a little #5953

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 21, 2025
8 changes: 8 additions & 0 deletions core/src/subgraph/inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,12 @@ impl<C: Blockchain> IndexingInputs<C> {
instrument: *instrument,
}
}

pub fn errors_are_non_fatal(&self) -> bool {
self.features.contains(&SubgraphFeature::NonFatalErrors)
}

pub fn errors_are_fatal(&self) -> bool {
!self.features.contains(&SubgraphFeature::NonFatalErrors)
}
}
5 changes: 1 addition & 4 deletions core/src/subgraph/registrar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ where
assignment_event_stream
.compat()
.map_err(SubgraphAssignmentProviderError::Unknown)
.map_err(CancelableError::Error)
.cancelable(&assignment_event_stream_cancel_handle, || {
Err(CancelableError::Cancel)
})
.cancelable(&assignment_event_stream_cancel_handle)
.compat()
.for_each(move |assignment_event| {
assert_eq!(assignment_event.node_id(), &node_id);
Expand Down
Loading
Loading