Skip to content

Commit

Permalink
Add delay between processing cleanup of PR API review revisions (#7433)
Browse files Browse the repository at this point in the history
Co-authored-by: praveenkuttappan <[email protected]>
  • Loading branch information
praveenkuttappan and praveenkuttappan authored Dec 11, 2023
1 parent b842845 commit a5a2745
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dotnet/APIView/APIViewWeb/Managers/PullRequestManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ public async Task CleanupPullRequestData()
{
try
{
if (await IsPullRequestEligibleForCleanup(prModel))
if (prModel.APIRevisionId != null && await IsPullRequestEligibleForCleanup(prModel))
{
_telemetryClient.TrackEvent("Closing review created for pull request " + prModel.PullRequestNumber);
_telemetryClient.TrackEvent($"Closing review {prModel.ReviewId}/{prModel.APIRevisionId} created for pull request {prModel.PullRequestNumber}");
await ClosePullRequestAPIRevision(prModel);
}
await Task.Delay(500);
}
catch (Exception ex)
{
Expand Down

0 comments on commit a5a2745

Please sign in to comment.