Verify Certificate
Celery tasks for verifying llmclient TLS certificates.
This module defines Celery tasks for verifying the cloud provider’s TLS certificates (e.g. AWS ACM) associated with llmclient custom domains, including signal handling and logging.
Main Tasks
- verify_certificate(certificate_arn):
Verifies the status of a TLS certificate and logs the result.
Signals
pre_verify_certificate: Sent before certificate verification begins.
post_verify_certificate: Sent after certificate verification is completed.
Configuration
Celery task behavior (retries, backoff, queue) is controlled by smarter_settings.
Logging
Task execution and certificate verification are logged using the smarter logging library, with waffle switches for task and llmclient logging.
Usage
Import this module and call the Celery task as needed to asynchronously verify an llmclient TLS certificate:
verify_certificate.delay(certificate_arn)
- raises Exception:
Any exception during task execution will trigger a retry according to Celery settings.
- smarter.apps.llmclient.tasks.verify_certificate.verify_certificate(certificate_arn)
Verify a TLS certificate.
This Celery task waits for the cloud provider to issue a TLS certificate, sending pre- and post-verification signals and logging the result.
- Parameters:
certificate_arn (
str) – The cloud provider’s id of the certificate, e.g. the ARN of an AWS ACM certificate.Signals
-------
pre_verify_certificate (django.dispatch.Signal) – Sent before certificate verification begins.
post_verify_certificate (django.dispatch.Signal) – Sent after certificate verification is completed.
- Return type:
None
- Raises:
Exception – Any exception raised during the verification process will trigger a retry according to Celery settings.