bartender.web.api.applications.submit#

Functions#

build_description(...)

Builds a job description.

submit(→ None)

Submit job description to scheduler and store job id returned by scheduler in db.

_upload_input_files(→ None)

Module Contents#

bartender.web.api.applications.submit.build_description(job_dir: pathlib.Path, payload: dict[str, str], config: bartender.config.ApplicatonConfiguration, application: str = '', submitter: str = '') bartender.schedulers.abstract.JobDescription#

Builds a job description.

Parameters:
  • job_dir (pathlib.Path) – The directory where the job will be executed.

  • payload (dict[str, str]) – The payload containing the non-file input data for the job.

  • config (bartender.config.ApplicatonConfiguration) – The configuration for the application.

  • application (str) – The name of the application.

  • submitter (str) – The user who submitted the job.

Returns:

Job description containing the job directory and command.

Return type:

bartender.schedulers.abstract.JobDescription

async bartender.web.api.applications.submit.submit(external_job_id: int, job_dir: pathlib.Path, application: str, submitter: bartender.web.users.User, payload: dict[str, str], job_dao: bartender.db.dao.job_dao.JobDAO, context: bartender.context.Context) None#

Submit job description to scheduler and store job id returned by scheduler in db.

Parameters:
  • external_job_id (int) – External job id.

  • job_dir (pathlib.Path) – Location where job input files are located.

  • application (str) – Application name that should be run.

  • submitter (bartender.web.users.User) – User that submitted the job.

  • payload (dict[str, str]) – Payload with non-file input data.

  • job_dao (bartender.db.dao.job_dao.JobDAO) – JobDAO object.

  • context (bartender.context.Context) – Context with applications and destinations.

Return type:

None

async bartender.web.api.applications.submit._upload_input_files(description: bartender.schedulers.abstract.JobDescription, filesystem: bartender.filesystems.abstract.AbstractFileSystem, localized_description: bartender.schedulers.abstract.JobDescription) None#
Parameters:
Return type:

None