Skip to content

Commit 4ea0a21

Browse files
committed
store: Do not fail a subgraph if pruning fails
1 parent dc49bce commit 4ea0a21

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

store/postgres/src/deployment_store.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,13 +1181,20 @@ impl DeploymentStore {
11811181
// how long pruning itself takes
11821182
let _section = stopwatch.start_section("transact_blocks_prune");
11831183

1184-
self.spawn_prune(
1184+
if let Err(res) = self.spawn_prune(
11851185
logger,
1186-
site,
1186+
site.cheap_clone(),
11871187
layout.history_blocks,
11881188
earliest_block,
11891189
batch.block_ptr.number,
1190-
)?;
1190+
) {
1191+
warn!(
1192+
logger,
1193+
"Failed to spawn prune task. Will try to prune again later";
1194+
"subgraph" => site.deployment.to_string(),
1195+
"error" => res.to_string(),
1196+
);
1197+
}
11911198
}
11921199

11931200
Ok(())

0 commit comments

Comments
 (0)