Closed ehuss closed 2 weeks ago
just curious: do we know why adding a milestone takes long? By looking at #1751 I wonder if adding a milestone is more a "cronjob-like" task or it needs to be triggered manually on some other event.
It needs to hit the set_milestone
endpoint possibly a few dozen times. That endpoint seems fairly slow.
This fixes an issue where not all cargo PRs were getting milestoned.
The process of milestoning all the cargo PRs can take more than 10 seconds. This was causing the thread to get cancelled due to the webhook timeout.
This fixes the problem by spawning a background task to handle the milestoning process.