pi_portal.modules.tasks.manifest.bases.task_manifest_base.TaskManifestBase

class pi_portal.modules.tasks.manifest.bases.task_manifest_base.TaskManifestBase[source]

Bases: object

Base class of a persistent manifest where tasks can be inventoried.

Implementations must create a persistent dictionary and cache it.

__init__() None[source]
add(task: TaskBase[TaskArgsBase, Any]) None[source]

Add a task to the manifest.

Parameters:

task (TaskBase[TaskArgsBase, Any]) – The task you wish to add.

abstract close() None[source]

Close any filehandles associated with the persistent dictionary.

property contents: List[TaskBase[TaskArgsBase, Any]]

Return the contents of the manifest, without disk activity.

metrics() TypeManifestMetrics[source]

Return metrics for this manifest, without disk activity.

Return type:

TypeManifestMetrics

remove(task: TaskBase[TaskArgsBase, Any]) None[source]

Remove a task from the manifest.

Parameters:

task (TaskBase[TaskArgsBase, Any]) – The task you wish to add.