Cancels the item if it was not yet completed; recursively cancels its children.
(self)
| 358 | return retval |
| 359 | |
| 360 | def cancel(self): |
| 361 | """Cancels the item if it was not yet completed; recursively cancels its children.""" |
| 362 | if self.has_state(TaskState.FINISHED_MASK): |
| 363 | for child in self.children: |
| 364 | child.cancel() |
| 365 | else: |
| 366 | self._set_state(TaskState.CANCELLED) |
| 367 | self._drop_children() |
| 368 | self.task_spec._on_cancel(self) |
| 369 | |
| 370 | def complete(self): |
| 371 | """Marks this task complete.""" |
nothing calls this directly
no test coverage detected