openaleph_procrastinate.model
DatasetJob
Bases: Job
A job with arbitrary payload bound to a dataset
.
The payload always contains an iterable of serialized EntityProxy
objects
in the entities
key. It may contain other payload context data in the
context
key.
There are helpers for accessing archive files or loading entities.
Source code in openaleph_procrastinate/model.py
from_entities(dataset, queue, task, entities)
classmethod
Make a job to process entities for a dataset
Source code in openaleph_procrastinate/model.py
from_entity(dataset, queue, task, entity)
classmethod
Make a job to process an entity for a dataset
Source code in openaleph_procrastinate/model.py
get_entities()
Get the entities from the payload
get_file_references()
Get file references per entity from this job
Source code in openaleph_procrastinate/model.py
get_writer()
load_entities()
Load the entities from the store to refresh it to the latest data
Source code in openaleph_procrastinate/model.py
EntityFileReference
Bases: BaseModel
A file reference (via content_hash
) to a servicelayer file from an entity
Source code in openaleph_procrastinate/model.py
get_localpath()
Get a temporary path for the file attached to this job
Danger
This is not tested.
open()
Open the file attached to this job
Danger
This is not tested.
Job
Bases: Stage
A job with arbitrary payload
Source code in openaleph_procrastinate/model.py
context
property
Get the context from the payload if any
Stage
Bases: BaseModel
Define an arbitrary (next) stage for a job