Merge pull request #2790 from castrapel/resolved_cert
Set resolved cert ID before resolving cert
This commit is contained in:
commit
8c73851708
|
@ -121,11 +121,11 @@ def fetch_acme_cert(id):
|
||||||
final_cert = pending_certificate_service.create_certificate(pending_cert, real_cert, pending_cert.user)
|
final_cert = pending_certificate_service.create_certificate(pending_cert, real_cert, pending_cert.user)
|
||||||
pending_certificate_service.update(
|
pending_certificate_service.update(
|
||||||
cert.get("pending_cert").id,
|
cert.get("pending_cert").id,
|
||||||
resolved=True
|
resolved_cert_id=final_cert.id
|
||||||
)
|
)
|
||||||
pending_certificate_service.update(
|
pending_certificate_service.update(
|
||||||
cert.get("pending_cert").id,
|
cert.get("pending_cert").id,
|
||||||
resolved_cert_id=final_cert.id
|
resolved=True
|
||||||
)
|
)
|
||||||
# add metrics to metrics extension
|
# add metrics to metrics extension
|
||||||
new += 1
|
new += 1
|
||||||
|
|
|
@ -42,11 +42,11 @@ def fetch(ids):
|
||||||
final_cert = pending_certificate_service.create_certificate(cert, real_cert, cert.user)
|
final_cert = pending_certificate_service.create_certificate(cert, real_cert, cert.user)
|
||||||
pending_certificate_service.update(
|
pending_certificate_service.update(
|
||||||
cert.id,
|
cert.id,
|
||||||
resolved=True
|
resolved_cert_id=final_cert.id
|
||||||
)
|
)
|
||||||
pending_certificate_service.update(
|
pending_certificate_service.update(
|
||||||
cert.id,
|
cert.id,
|
||||||
resolved_cert_id=final_cert.id
|
resolved=True
|
||||||
)
|
)
|
||||||
# add metrics to metrics extension
|
# add metrics to metrics extension
|
||||||
new += 1
|
new += 1
|
||||||
|
@ -100,11 +100,11 @@ def fetch_all_acme():
|
||||||
final_cert = pending_certificate_service.create_certificate(pending_cert, real_cert, pending_cert.user)
|
final_cert = pending_certificate_service.create_certificate(pending_cert, real_cert, pending_cert.user)
|
||||||
pending_certificate_service.update(
|
pending_certificate_service.update(
|
||||||
pending_cert.id,
|
pending_cert.id,
|
||||||
resolved=True
|
resolved_cert_id=final_cert.id
|
||||||
)
|
)
|
||||||
pending_certificate_service.update(
|
pending_certificate_service.update(
|
||||||
pending_cert.id,
|
pending_cert.id,
|
||||||
resolved_cert_id=final_cert.id
|
resolved=True
|
||||||
)
|
)
|
||||||
# add metrics to metrics extension
|
# add metrics to metrics extension
|
||||||
new += 1
|
new += 1
|
||||||
|
|
|
@ -259,13 +259,13 @@ def upload(pending_certificate_id, **kwargs):
|
||||||
|
|
||||||
final_cert = create_certificate(pending_cert, partial_cert, pending_cert.user)
|
final_cert = create_certificate(pending_cert, partial_cert, pending_cert.user)
|
||||||
|
|
||||||
update(
|
|
||||||
pending_cert.id,
|
|
||||||
resolved=True
|
|
||||||
)
|
|
||||||
pending_cert_final_result = update(
|
pending_cert_final_result = update(
|
||||||
pending_cert.id,
|
pending_cert.id,
|
||||||
resolved_cert_id=final_cert.id
|
resolved_cert_id=final_cert.id
|
||||||
)
|
)
|
||||||
|
update(
|
||||||
|
pending_cert.id,
|
||||||
|
resolved=True
|
||||||
|
)
|
||||||
|
|
||||||
return pending_cert_final_result
|
return pending_cert_final_result
|
||||||
|
|
|
@ -142,7 +142,6 @@ def delete_txt_record(change_id, account_number, domain, token):
|
||||||
try:
|
try:
|
||||||
all_txt_records = node.get_all_records_by_type('TXT')
|
all_txt_records = node.get_all_records_by_type('TXT')
|
||||||
except DynectGetError:
|
except DynectGetError:
|
||||||
sentry.captureException()
|
|
||||||
metrics.send('delete_txt_record_geterror', 'counter', 1)
|
metrics.send('delete_txt_record_geterror', 'counter', 1)
|
||||||
# No Text Records remain or host is not in the zone anymore because all records have been deleted.
|
# No Text Records remain or host is not in the zone anymore because all records have been deleted.
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue