Convenience method that creates a task and polls for its result. Equivalent to calling create_task() followed by join_task_result(). Args: task: The task configuration payload. callback_url: An optional callback URL for task completion. Ret
(self, task: TaskPayload, callback_url: Optional[str] = None)
| 218 | 61, "ERROR_MAXIMUM_TIME_EXCEED", "Maximum time is exceed.") |
| 219 | |
| 220 | def solve(self, task: TaskPayload, callback_url: Optional[str] = None) -> dict: |
| 221 | """ |
| 222 | Convenience method that creates a task and polls for its result. |
| 223 | |
| 224 | Equivalent to calling create_task() followed by join_task_result(). |
| 225 | |
| 226 | Args: |
| 227 | task: The task configuration payload. |
| 228 | callback_url: An optional callback URL for task completion. |
| 229 | |
| 230 | Returns: |
| 231 | dict: The solution dictionary from the completed task. |
| 232 | """ |
| 233 | task_id = self.create_task(task, callback_url) |
| 234 | return self.join_task_result(task_id) |
| 235 | |
| 236 | async def solve_async(self, task: TaskPayload, callback_url: Optional[str] = None) -> dict: |
| 237 | """ |