connect.tasks
connect.tasks
Task resources.
Classes
Name | Description |
---|---|
Task | |
Tasks |
Task
connect.tasks.Task(self, /, params, **kwargs)
Attributes
Name | Description |
---|---|
error_code | The error code. |
error_message | The error message. |
is_finished | The task state. |
Methods
Name | Description |
---|---|
update | Update the task. |
wait_for | Wait for the task to finish. |
update
connect.tasks.Task.update(*args, **kwargs)
Update the task.
See Also
task.wait_for : Wait for the task to complete.
Notes
When waiting for a task to complete, one should consider utilizing task.wait_for
.
Examples
>>> task.output
["Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
]>>> task.update()
>>> task.output
["Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"Pretium aenean pharetra magna ac placerat vestibulum lectus mauris."
]
wait_for
connect.tasks.Task.wait_for()
Wait for the task to finish.
Examples
>>> task.wait_for()
None
Tasks
connect.tasks.Tasks(self, params)
Methods
Name | Description |
---|---|
get | Get a task. |
get
connect.tasks.Tasks.get(uid, **kwargs)
Get a task.
Parameters
Name | Type | Description | Default |
---|---|---|---|
uid | str | Task identifier. | required |
Returns
Name | Type | Description |
---|---|---|
Task |