Merge pull request #2868 from hosseinsh/acme-client-setup-retrial

ACME-clientsetup-retrial
This commit is contained in:
Hossein Shafagh 2019-10-18 11:08:31 -07:00 committed by GitHub
commit 2418c3eb0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ from lemur.extensions import metrics, sentry
from lemur.plugins import lemur_acme as acme from lemur.plugins import lemur_acme as acme
from lemur.plugins.bases import IssuerPlugin from lemur.plugins.bases import IssuerPlugin
from lemur.plugins.lemur_acme import cloudflare, dyn, route53, ultradns from lemur.plugins.lemur_acme import cloudflare, dyn, route53, ultradns
from retrying import retry
class AuthorizationRecord(object): class AuthorizationRecord(object):
@ -197,6 +198,7 @@ class AcmeHandler(object):
) )
return pem_certificate, pem_certificate_chain return pem_certificate, pem_certificate_chain
@retry(stop_max_attempt_number=5, wait_fixed=5000)
def setup_acme_client(self, authority): def setup_acme_client(self, authority):
if not authority.options: if not authority.options:
raise InvalidAuthority("Invalid authority. Options not set") raise InvalidAuthority("Invalid authority. Options not set")