Acquire.Access._jobsheet module

class JobSheet(job=None, authorisation=None)[source]

Bases: object

This class holds a complete record of a job that the access service has been asked to perform.

authorisation()[source]

Return the original authorisation for this job

static from_data(data)[source]

Return a JobSheet constructed from the passed json-deserialised dictionary

is_null()[source]

Return whether or not this JobSheet is null

job()[source]

Return the original job request

static load(uid)[source]

Return the JobSheet with specified uid loaded from the ObjectStore

request_services()[source]

Request all of the services needed to perform the job. This will contract a compute service and a storage service to run the job.

The storage service will provide (1) a file upload PAR to enable the user to upload the input, and (2) a bucket write PAR to enable the compute service to write the output

The compute service will be supplied with the bucket write PAR from the storage service and will supply a run calculation PAR to enable the user to trigger the start of the job

This returns the upload PAR the user must use to upload the input, the run PAR that the user must call after uploading input to trigger the start of the calculation, and the expiry date when both of these PARs will become invalid (i.e. the user must trigger both of them before that date)

save()[source]

Save this JobSheet to the object store

set_payment(cheque)[source]

Pass in and cash that contains the source of value of paying for this job. This will cash the cheque and store the value within credit notes held in this job sheet

to_data()[source]

Return this converted to a json-serialisable dictionary

total_cost()[source]

Return the total maximum quoted cost for this job. The total cost to run the job must not exceed this

uid()[source]

Return the UID of this JobSheet