Downloader Job

class pyrefinebio.DownloaderJob(id=None, downloader_task=None, num_retries=None, retried=None, was_recreated=None, worker_id=None, ram_amount=None, worker_version=None, batch_job_id=None, batch_job_queue=None, failure_reason=None, success=None, original_files=[], start_time=None, end_time=None, created_at=None, last_modified=None, is_queued=None)

DownloaderJob.

Retrieve a DownloaderJob by id

>>> import pyrefinebio
>>> id = 1
>>> job = pyrefinebio.DownloaderJob.get(id)

Retrieve a list of DownloaderJobs based on filters

>>> import pyrefinebio
>>> jobs = pyrefinebio.DownloaderJob.search(batch_job_id=0, success=True)
classmethod get(id)

Retrieve a DownloaderJob based on id

Returns:

DownloaderJob

Parameters:

id (int) – the id for the DownloaderJob you want to get

classmethod search(**kwargs)

Retrieve a list of DownloaderJobs based on various filters

Returns:

list of DownloaderJob

Keyword Arguments:
  • id (int) – filter based on the id of the DownloaderJob

  • downloader_task (str) – filter based on the job’s task type

  • num_retries (int) – filter based on the number of times the job has retried

  • retried (bool) – filter based on if the job has retried

  • was_recreated (bool) – filter based on if the job was recreated

  • worker_id (str) – filter based on the job’s worker id

  • ram_amount (int) – filter based on the amount of ram assigned to the job

  • worker_version (str) – filter based on the job’s worker version

  • batch_job_id (str) – filter based on the job’s batch id

  • failure_reason (str) – filter based on the reason why the job failed

  • success (bool) – filter based on if the job succeeded

  • original_files (str) – filter based on the ids of the OriginalFiles associated with the job

  • start_time (str) – filter based on the time when the job started

  • end_time (str) – filter based on the time when the job finished

  • created_at (str) – filter based on the time that the job was created

  • last_modified (str) – filter based on the time that the job was last modified

  • ordering (str) – which field to use when ordering the results.

  • limit (int) – number of results to return per page.

  • offset (int) – the initial index from which to return the results.

  • sample_accession_code (str) – filter based on the Samples associated with the job