pysepal.solara.notifications.notifier.TaskTracker#
- class pysepal.solara.notifications.notifier.TaskTracker(bus, task)[source]#
Context manager for tracking a long-running task with milestones.
Initialize tracker with a bus reference and task identity.
Methods
Initialize tracker with a bus reference and task identity.
Explicitly mark the task as cancelled.
Explicitly mark the task as completed.
Explicitly mark the task as failed.
Update continuous progress (0.0-1.0).
Add a named milestone and increment current_step.
Update the task title.
- Parameters:
bus (NotificationBus)
task (TrackedTask)
- TaskTracker.__init__(bus, task)[source]#
Initialize tracker with a bus reference and task identity.
- Parameters:
bus (NotificationBus)
task (TrackedTask)
- TaskTracker.complete(message=None)[source]#
Explicitly mark the task as completed.
- Parameters:
message (str | None)
- Return type:
None
- TaskTracker.fail(message)[source]#
Explicitly mark the task as failed.
- Parameters:
message (str)
- Return type:
None
- TaskTracker.set_progress(value)[source]#
Update continuous progress (0.0-1.0). Does NOT create a milestone.
- Parameters:
value (float)
- Return type:
None