Skip to content

Commit

Permalink
Add a processing delay (1 min) for ensure resources are be visible (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell authored Oct 4, 2023
1 parent 143fcbd commit 418c482
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Tingle.AzdoCleaner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ public static IEndpointConventionBuilder MapWebhooksAzure(this IEndpointRouteBui
RemoteUrl = remoteUrl,
RawProjectUrl = rawProjectUrl,
};
await publisher.PublishAsync(evt);
// if the PR closes immediately after the resources are created they may not be removed
// adding a delay allows the changes in the cloud provider to have propagated
var delay = TimeSpan.FromMinutes(1);
await publisher.PublishAsync(@event: evt, delay: delay);
}
else
{
Expand Down

0 comments on commit 418c482

Please sign in to comment.