Saltar al contenido principal

DatafileJob

Job
DashAI.back.job.DatafileJob

Job that fetches a dataset file from an external hub source.

Parameters​

kwargs : dict

  • datafile_id: int (DB row id)
  • source_name: str (DatasetSource class name)
  • dataset_source_id: str (source-specific dataset identifier)

Methods​

get_job_name(self) -> str

Defined on DatafileJob

Get a descriptive name for the job.

on_cancel(self) -> None

Defined on DatafileJob

Remove the partial download of a cancelled or killed job.

run(self) -> None

Defined on DatafileJob

Run the job.

set_status_as_delivered(self, session_factory: 'sessionmaker' = <function DatafileJob.<lambda> at 0x7f8ea82ae0c0>) -> None

Defined on DatafileJob

No-op: datafile downloads don't use the delivered state.

set_status_as_error(self, session_factory: 'sessionmaker' = <function DatafileJob.<lambda> at 0x7f8ea82ae200>) -> None

Defined on DatafileJob

Set the datafile status as error.

Parameters

session_factory : sessionmaker
Factory producing a SQLAlchemy session.

report_progress(self, fraction: Optional[float], message: Optional[str] = None) -> None

Defined on BaseJob

Report the job's progress to the job queue.

Parameters

fraction: Optional float
Completion in the range 0-1, or None when the total work is unknown (the frontend then shows an indeterminate bar).
message: Optional str
Short description of the current phase.