Skip to content

microservice-job-broker


Class: FtrexController

Defined in: packages/microservice/job-broker/src/quantification/controllers/ftrex.controller.ts:14

HTTP controller for FTREX quantification jobs.

Accepts quantification requests for the FTREX solver and exposes a listing of quantified job reports.

Constructors

Constructor

new FtrexController(producerService, storageService): FtrexController

Defined in: packages/microservice/job-broker/src/quantification/controllers/ftrex.controller.ts:20

Construct the controller with producer and storage services.

Parameters

producerService

ProducerService

Service for publishing quantification jobs to RabbitMQ

storageService

StorageService

Service for reading quantified job reports from MongoDB

Returns

FtrexController

Methods

createAndQueueQuant()

createAndQueueQuant(quantRequest): void

Defined in: packages/microservice/job-broker/src/quantification/controllers/ftrex.controller.ts:33

Endpoint to create and queue a quantification job for the FTREX solver.

Parameters

quantRequest

QuantifyRequest

The quantification request object containing necessary model data.

Returns

void

A promise that resolves to void.

Throws

InternalServerErrorException When there is a problem queueing the quantification job.


getQuantifiedReports()

getQuantifiedReports(): Promise<QuantificationJobReport[]>

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

Controller method to handle GET requests for quantified reports at the "/ftrex" endpoint.

Returns

Promise<QuantificationJobReport[]>

A promise that resolves to an array of QuantifiedReport objects.

Throws

NotFoundException Throws an exception if the server is unable to find the requested list of quantified reports.