Skip to content
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

Log conflicts on insert into pull_request_build #1166

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions database/src/pool/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,13 +699,14 @@ where
exclude: Option<&str>,
runs: Option<i32>,
) {
self.conn()
if let Err(e) = self.conn()
.execute(
"insert into pull_request_build (pr, complete, requested, include, exclude, runs) VALUES ($1, false, CURRENT_TIMESTAMP, $2, $3, $4) ON CONFLICT DO NOTHING",
"insert into pull_request_build (pr, complete, requested, include, exclude, runs) VALUES ($1, false, CURRENT_TIMESTAMP, $2, $3, $4)",
&[&(pr as i32), &include, &exclude, &runs],
)
.await
.unwrap();
.await {
log::error!("failed to queue_pr({}, {:?}, {:?}, {:?}): {:?}", pr, include, exclude, runs, e);
}
}
async fn pr_attach_commit(&self, pr: u32, sha: &str, parent_sha: &str) -> bool {
self.conn()
Expand Down