Skip to content

Commit 60fc307

Browse files
committed
Remove artifact from PR queue when purging it
This should make the `purge_artifact` command more universal, and really purge the given artifact from all places in DB.
1 parent 9460311 commit 60fc307

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

database/src/pool/postgres.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,13 @@ where
13441344
.execute("delete from artifact where name = $1", &[&info.name])
13451345
.await
13461346
.unwrap();
1347+
self.conn()
1348+
.execute(
1349+
"delete from pull_request_build where bors_sha = $1",
1350+
&[&info.name],
1351+
)
1352+
.await
1353+
.unwrap();
13471354
}
13481355
}
13491356

database/src/pool/sqlite.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,12 @@ impl Connection for SqliteConnection {
12161216
self.raw_ref()
12171217
.execute("delete from artifact where name = ?1", [info.name])
12181218
.unwrap();
1219+
self.raw_ref()
1220+
.execute(
1221+
"delete from pull_request_build where bors_sha = ?1",
1222+
[info.name],
1223+
)
1224+
.unwrap();
12191225
}
12201226
}
12211227

0 commit comments

Comments
 (0)