# Path: virtool/types.py



from virtool.tasks.pg import update
from virtool.tasks.task import Task
from virtool.types import App
from virtool.users.db import PROJECTION
import virtool.users.db


class UpdateUserDocumentsTask(Task):
    """
    Update user documents that don't contain a "handle" field.

    For B2C users with b2c_given_name and b2c_family_name included in their user document, generate handle.

    For all other users use existing _id values as handle.

    """

    task_type = "update_user_documents"


# Path: virtool/types.py



# Path: virtool/users/tasks.py
from virtool.tasks.pg import update
from virtool.tasks.task import Task
from virtool.types import App
from virtool.users.db import PROJECTION
import virtool.users.db



class UpdateUserDocumentsTask(Task):
    """
    Update user documents that don't contain a "handle" field.

    For B2C users with b2c_given_name and b2c_family_name included in their user document, generate handle.

    For all other users use existing _id values as handle.

    """

    task_type = "update_user_documents"


    def __init__(self, app: App, task_id: int):