def update_destinations(target, value, initiator):
    """
    Attempt to upload certificate to the new destination

    :param target:
    :param value:
    :param initiator:
    :return:
    """
    destination_plugin = plugins.get(value.plugin_name)
    status = FAILURE_METRIC_STATUS

    if target.expired:
        return
    try:
        if target.private_key or not destination_plugin.requires_key:
            destination_plugin.upload(
                target.name,
                target.body,
                target.private_key,
                target.chain,
                value.options,
            )
            status = SUCCESS_METRIC_STATUS
    except Exception as e:
        capture_exception()
        raise

    metrics.send(
        "destination_upload",
        "counter",
        1,
        metric_tags={
            "status": status,
            "certificate": target.name,
            "destination": value.label,
        },
    )

    Attempt to upload certificate to the new destination

    :param target:
    :param value:
    :param initiator:
    :return:
    
lemur/certificates/models.py