lancium.api.JobInput

JobInput

This is an object that represents job input data.

class JobInput:
JobInput(id, job_id, **kwargs)

Initialize a JobInput object.

Args:

  • id (int): unique identifier for JobInput (data-id)
  • job_id (int): associated Job ID
  • name (string): filename in the job working directory
  • source_type (string): one of these options ('file', 'data', 'url')
  • source (string): source location of the input data
  • cache (bool, optional): if True, the file is copied to the node during execution as READ ONLY upload_complete (bool): boolean representing whether the upload has been completed chunks_received (string): represents the range of chunks received by Lancium Compute
def upload(self, file_path, callback=None):

Upload input data for a job.

PATCH /jobs//data/

Args:

  • `file_path (string): file path of input file
  • callback (func): called after each chunk is successfully uploaded, accepts arguments in the format of (file_size, file_start, total_chunks, current_chunk)

Returns: JSON: Response Object in JSON format

@staticmethod
def delete(job_id, id, **kwargs):

Delete input data from a job.

DELETE /jobs//data/

ARGS:

  • job_id (int): Job ID
  • id (int): JobInput ID

Returns: None: None

def destroy(self):

Delete input data from a job.

DELETE /jobs//data/

ARGS: None (None)

Returns: None: None