Skip to content

Commit e79e9b3

Browse files
committed
store: Add fields to store errors from pruning in prune_state
1 parent f02dfa2 commit e79e9b3

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
alter table subgraphs.prune_state
2+
drop column errored_at,
3+
drop column error;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
alter table subgraphs.prune_state
2+
add column errored_at timestamptz,
3+
add column error text,
4+
add constraint error_ck check ((errored_at is null) = (error is null));

store/postgres/src/relational/prune.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,8 @@ mod status {
534534

535535
started_at -> Timestamptz,
536536
finished_at -> Nullable<Timestamptz>,
537+
errored_at -> Nullable<Timestamptz>,
538+
error -> Nullable<Text>,
537539
}
538540
}
539541

@@ -633,6 +635,9 @@ mod status {
633635

634636
pub started_at: DateTime<Utc>,
635637
pub finished_at: Option<DateTime<Utc>>,
638+
639+
pub errored_at: Option<DateTime<Utc>>,
640+
pub error: Option<String>,
636641
}
637642

638643
/// Per-table information about the pruning run for a deployment

0 commit comments

Comments
 (0)