def transaction_worker(transaction):
    """
    Perform a single transaction in the background after request context.

    Args:
        transaction: The transaction instance
    """
    session = transaction.db_driver.session_scope(can_inherit=False)
    with session, transaction:
        transaction.take_action()
        return transaction.json, transaction.status_code