Saltar al contenido principal

DatasetJob

Job
DashAI.back.job.DatasetJob

Job for processing and uploading datasets using streaming data processing.

Parameters

kwargs : Dict[str, Any] A dictionary containing the parameters for the job, including:

  • name: Name of the dataset
  • datatype_name: Name of the datatype
  • params: Parameters for the datatype
  • file_path: Path to the temporarily saved file
  • temp_dir: Directory containing the temporary file
  • filename: Name of the uploaded file
  • db: Database session

Methods

get_job_name(self) -> str

Defined on DatasetJob

Get a descriptive name for the job.

run(self) -> None

Defined on DatasetJob

Run the job.

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

Defined on DatasetJob

Set the status of the dataset as delivered.

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

Defined on DatasetJob

Set the job status as error.

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.