cterasdk.lib.tasks module#
- class cterasdk.lib.tasks.AwaitableEdgeTask(ctera, ref)#
Bases:
AwaitableTaskAwaitable Edge Filer Task Object
- async a_status()#
Asynchronous function to retrieve task status.
- status()#
Synchronous function to retrieve task status.
- class cterasdk.lib.tasks.AwaitablePortalTask(ctera, ref)#
Bases:
AwaitableTaskAwaitable Portal Task Object
- async a_status()#
Asynchronous function to retrieve task status.
- status()#
Synchronous function to retrieve task status.
- class cterasdk.lib.tasks.AwaitableTask(ctera, ref)#
Bases:
ABC- abstractmethod async a_status()#
- async a_wait(timeout=None, poll_interval=None)#
Wait until the given task is complete, or until the timeout expires.
If a positive timeout (in seconds) is specified, this function will block only up to that duration. If timeout is None or non-positive, it will wait indefinitely until the task completes.
- Parameters:
timeout (float,optional) – Raise exception in the event of a timeout
poll_interval (float,optional) – Poll interval, defaults to 1 second
- property ref#
- abstractmethod status()#
- wait(timeout=None, poll_interval=None)#
Wait until the given task is complete, or until the timeout expires.
If a positive timeout (in seconds) is specified, this function will block only up to that duration. If timeout is None or non-positive, it will wait indefinitely until the task completes.
- Parameters:
timeout (float,optional) – Raise exception in the event of a timeout
poll_interval (float,optional) – Poll interval, defaults to 1 second
- class cterasdk.lib.tasks.BaseTask(task)#
Bases:
ObjectBase Task
- Variables:
id (int) – Task ID
name (str) – Task name
start_time (datetime.datetime) – Start time
elapsed_time (int) – Elapsed time
status (cterasdk.common.enum.TaskRunningStatus) – Status
percentage (int) – Percentage
end_time (datetime.datetime) – End time
result (cterasdk.common.object.Object) – Task result
- property completed#
- property completed_with_warnings#
- property failed#
- class cterasdk.lib.tasks.EdgeTask(task)#
Bases:
BaseTaskEdge Task
- Variables:
description (str) – Task description
- class cterasdk.lib.tasks.FilesystemTask(task)#
Bases:
PortalTaskFilesystem Task
- Variables:
files_processed (int) – Files processed
bytes_processed (int) – Bytes processed
total_files (int) – Total files
total_bytes (int) – Total bytes
error_type (str) – Task error
file_in_progress (str) – File in progress
user_uid (int) – User UID
cursor (cterasdk.common.object.Object) – Cursor