Skip to content

microservice-job-broker


Class: JobBrokerController ​

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:18

Constructors ​

Constructor ​

new JobBrokerController(jobBrokerService): JobBrokerController

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:23

Constructs the JobBrokerController with the necessary service.

Parameters ​

jobBrokerService ​

JobBrokerService

The service to handle job broker operations.

Returns ​

JobBrokerController

Methods ​

createJob() ​

createJob(): JobResponse

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:108

Creates a new job.

Returns ​

JobResponse

An object containing a message confirming the job creation.

Throws ​

InternalServerErrorException When there is a problem creating the job.


getCompletedJobs() ​

getCompletedJobs(): Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:93

Retrieves jobs and tasks that have completed processing.

Returns ​

Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

Quantification jobs and executable tasks with completed status.


getJobs() ​

getJobs(status): Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:48

Retrieves a list of jobs based on the status.

Parameters ​

status ​

string

Lifecycle status to filter jobs by (e.g., "pending", "queued", "completed")

Returns ​

Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

An object containing a message with the list of pending jobs.

Throws ​

NotFoundException When the list of pending jobs cannot be found.


getJobTypes() ​

getJobTypes(): JobResponse

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:32

Retrieves a list of job types.

Returns ​

JobResponse

An object containing a message with the list of job types.

Throws ​

NotFoundException When the list of job types cannot be found.


getPendingJobs() ​

getPendingJobs(): Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:65

Retrieves a list of pending jobs.

Returns ​

Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

An object containing a message with the list of pending jobs.

Throws ​

NotFoundException When the list of pending jobs cannot be found.


getQueuedJobs() ​

getQueuedJobs(): Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

Defined in: packages/microservice/job-broker/src/job-broker.controller.ts:79

Retrieves jobs and tasks that are in the queued state.

Returns ​

Promise<{ jobs: QuantificationJobReport[]; tasks: ExecutableJobReport[]; }>

Quantification jobs and executable tasks currently queued for processing.