plexus.cli.shared.CommandProgress module

class plexus.cli.shared.CommandProgress.CommandProgress

Bases: object

Progress tracking that’s safe to use in both direct and Celery execution.

classmethod get_current_state() ProgressState | None

Get the current progress state if any.

classmethod set_update_callback(callback)

Set the callback function that will be called when progress is updated.

classmethod track(total: int, status: str)

Context manager for tracking progress of an operation. Safe to use even when no callback is set.

classmethod update(current: int, total: int, status: str = None)

Update the progress state and notify the callback if set. Safe to call even when no callback is set.

class plexus.cli.shared.CommandProgress.ProgressState(current: int, total: int, status: str, start_time: float)

Bases: object

__init__(current: int, total: int, status: str, start_time: float) None
current: int
property elapsed_time: str
property estimated_remaining: str | None
start_time: float
status: str
total: int