Skip to content

Commit

Permalink
Increased the start of the certificate renewal timer (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
shibayan authored Aug 12, 2021
1 parent 9d95c35 commit 3a2774e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions KeyVault.Acmebot/Functions/RenewCertificates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public async Task Orchestrator([OrchestrationTrigger] IDurableOrchestrationConte
return;
}

// スロットリング対策として 60 秒以内でジッターを追加する
var jitter = (uint)context.NewGuid().GetHashCode() % 60;
// スロットリング対策として 120 秒以内でジッターを追加する
var jitter = (uint)context.NewGuid().GetHashCode() % 120;

await context.CreateTimer(context.CurrentUtcDateTime.AddSeconds(jitter), CancellationToken.None);

Expand All @@ -55,7 +55,7 @@ public async Task Orchestrator([OrchestrationTrigger] IDurableOrchestrationConte
}

[FunctionName(nameof(RenewCertificates) + "_" + nameof(Timer))]
public async Task Timer([TimerTrigger("0 0 0 * * 1,5")] TimerInfo timer, [DurableClient] IDurableClient starter, ILogger log)
public async Task Timer([TimerTrigger("0 0 0 * * 1,3,5")] TimerInfo timer, [DurableClient] IDurableClient starter, ILogger log)
{
// Function input comes from the request content.
var instanceId = await starter.StartNewAsync(nameof(RenewCertificates) + "_" + nameof(Orchestrator));
Expand Down

0 comments on commit 3a2774e

Please sign in to comment.