Skip to content

Commit cd9df22

Browse files
committed
Process rollup in the background
1 parent 0ef5b45 commit cd9df22

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

site/src/request_handlers/github.rs

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,22 @@ async fn handle_push(ctxt: Arc<SiteCtxt>, push: github::Push) -> ServerResult<gi
4848
None => return Ok(github::Response),
4949
};
5050

51-
let previous_master = &push.before;
51+
let previous_master = push.before;
5252
let commits = push.commits;
5353

54-
handle_rollup_merge(
55-
ci_client,
56-
main_repo_client,
57-
commits,
58-
previous_master,
59-
rollup_pr_number,
60-
)
61-
.await?;
54+
// GitHub webhooks have a timeout of 10 seconds, so we process this
55+
// in the background.
56+
tokio::spawn(async move {
57+
let result = handle_rollup_merge(
58+
ci_client,
59+
main_repo_client,
60+
commits,
61+
&previous_master,
62+
rollup_pr_number,
63+
)
64+
.await;
65+
log::info!("Processing of rollup merge finished: {:#?}", result);
66+
});
6267
Ok(github::Response)
6368
}
6469

0 commit comments

Comments
 (0)