def publish_request(liveaction, execution):
    """
    Publish an action execution.

    :return: (liveaction, execution)
    :rtype: tuple
    """
    # Assume that this is a creation.
    LiveAction.publish_create(liveaction)
    LiveAction.publish_status(liveaction)
    ActionExecution.publish_create(execution)

    # TODO: This results in two queries, optimize it
    #  extra = {'liveaction_db': liveaction, 'execution_db': execution}
    extra = {}
    LOG.audit(
        "Action execution requested. LiveAction.id=%s, ActionExecution.id=%s"
        % (liveaction.id, execution.id),
        extra=extra,
    )

    return liveaction, execution

    Publish an action execution.

    :return: (liveaction, execution)
    :rtype: tuple
    
st2common/st2common/services/action.py