Verify Certificate

Celery tasks for verifying llmclient ACM certificates.

This module defines Celery tasks for verifying AWS ACM certificates associated with llmclient custom domains, including signal handling and logging.

Main Tasks

  • verify_certificate(certificate_arn):

    Verifies the status of an AWS ACM 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 ACM 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 an AWS ACM certificate.

This Celery task verifies the status of an ACM certificate in AWS, sending pre- and post-verification signals and logging the result.

Parameters:
  • certificate_arn (str) – The Amazon Resource Name (ARN) of the ACM certificate to verify.

  • 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.