Skip to content

context

drunc.process_manager.interface.context

Classes

ProcessManagerContext(*args, **kwargs)

Bases: ShellContext

Source code in drunc/process_manager/interface/context.py
def __init__(self, *args: object, **kwargs: object) -> None:
    self.status_receiver = None
    super(ProcessManagerContext, self).__init__(*args, **kwargs)
Methods:
create_token(**kwargs)

Create a dummy token for the user in the process manager context.

This is a placeholder implementation and should be replaced with actual token creation logic as needed.

Source code in drunc/process_manager/interface/context.py
def create_token(self, **kwargs: object) -> Token:
    """
    Create a dummy token for the user in the process manager context.

    This is a placeholder implementation and should be replaced with actual token
    creation logic as needed.
    """
    return create_dummy_token_from_uname()
terminate()

Run the cleanup procedures for the process manager context.

This method stops the status receiver if it is running, ensuring that any resources associated with the process manager context are properly released.

Returns:

Type Description
None

None

Source code in drunc/process_manager/interface/context.py
def terminate(self) -> None:
    """
    Run the cleanup procedures for the process manager context.

    This method stops the status receiver if it is running, ensuring that any
    resources associated with the process manager context are properly released.

    Args:
        None

    Returns:
        None
    """
    if self.status_receiver:
        self.status_receiver.stop()

Functions: