mirror of
https://github.com/urbit/shrub.git
synced 2024-12-13 16:03:36 +03:00
bias :acme certificate renewals towards the end of the week
This commit is contained in:
parent
44cb7d0dcf
commit
ef36c9a220
@ -983,8 +983,21 @@
|
||||
(emit (notify msg ~))
|
||||
:: set renewal timer, install certificate in %eyre
|
||||
::
|
||||
:: Certificates expire after ~d90. We want time for retries and
|
||||
:: to work around rate limits, so our renewal timer is for ~d60.
|
||||
:: Renewals count towards weekly rate limits, but are allowed to
|
||||
:: continue past rate limits, so fudge the timer towards the end
|
||||
:: of the week nearest ~d60.
|
||||
::
|
||||
=< install:effect
|
||||
(retry:effect 0 %renew / ~d60)
|
||||
=; lul=@dr
|
||||
(retry:effect 0 %renew / lul)
|
||||
%+ add
|
||||
(mul ~m1 (~(rad og eny.bow) (bex 8)))
|
||||
=/ weekday (daws:chrono:userlib (yore now.bow))
|
||||
?: (gth weekday 4)
|
||||
(sub ~d60 (mul ~d1 (sub weekday 4)))
|
||||
(add ~d60 (mul ~d1 (sub 4 weekday)))
|
||||
:: +get-authz: accept ACME service authorization object
|
||||
::
|
||||
++ get-authz
|
||||
|
Loading…
Reference in New Issue
Block a user