(self, task_id)
| 203 | |
| 204 | @error_wrapper |
| 205 | async def start_task(self, task_id): |
| 206 | resp = await self.post(f'{self.earn_domain}/api/v1/tasks/{task_id}/start') |
| 207 | resp_json = await resp.json() |
| 208 | if resp_json.get("status") == 'STARTED': |
| 209 | return True |
| 210 | raise Exception(f"unknown response structure. status: {resp.status}. body: {resp_json}") |
| 211 | |
| 212 | @error_wrapper |
| 213 | async def validate_task(self, task_id, keyword: str) -> bool: |
no test coverage detected