Skip to content

Process rollup in the background #1378

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 1 commit into from
Aug 1, 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
23 changes: 14 additions & 9 deletions site/src/request_handlers/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,22 @@ async fn handle_push(ctxt: Arc<SiteCtxt>, push: github::Push) -> ServerResult<gi
None => return Ok(github::Response),
};

let previous_master = &push.before;
let previous_master = push.before;
let commits = push.commits;

handle_rollup_merge(
ci_client,
main_repo_client,
commits,
previous_master,
rollup_pr_number,
)
.await?;
// GitHub webhooks have a timeout of 10 seconds, so we process this
// in the background.
tokio::spawn(async move {
let result = handle_rollup_merge(
ci_client,
main_repo_client,
commits,
&previous_master,
rollup_pr_number,
)
.await;
log::info!("Processing of rollup merge finished: {:#?}", result);
});
Ok(github::Response)
}

Expand Down