MCPcopy
hub / github.com/Textualize/rich / stop_task

Method stop_task

rich/progress.py:1402–1415  ·  view source on GitHub ↗

Stop a task. This will freeze the elapsed time on the task. Args: task_id (TaskID): ID of task.

(self, task_id: TaskID)

Source from the content-addressed store, hash-verified

1400 task.start_time = self.get_time()
1401
1402 def stop_task(self, task_id: TaskID) -> None:
1403 """Stop a task.
1404
1405 This will freeze the elapsed time on the task.
1406
1407 Args:
1408 task_id (TaskID): ID of task.
1409 """
1410 with self._lock:
1411 task = self._tasks[task_id]
1412 current_time = self.get_time()
1413 if task.start_time is None:
1414 task.start_time = current_time
1415 task.stop_time = current_time
1416
1417 def update(
1418 self,

Callers 3

make_progressFunction · 0.95
run_stepsFunction · 0.80

Calls 1

get_timeMethod · 0.80

Tested by 1

make_progressFunction · 0.76