(self, task_id, error='')
| 62 | self.save() |
| 63 | |
| 64 | def mark_failed(self, task_id, error=''): |
| 65 | for t in self.tasks: |
| 66 | if t.id == task_id: |
| 67 | t.status = STATUS_FAILED |
| 68 | t.error = error[:300] |
| 69 | break |
| 70 | self.save() |
| 71 | |
| 72 | def is_complete(self): |
| 73 | return all(t.status in (STATUS_DONE, STATUS_SKIPPED) for t in self.tasks) |