Skip to content

microservice-job-broker


Class: ScramController

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

HTTP controller for SCRAM quantification jobs.

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

Constructors

Constructor

new ScramController(producerService, storageService): ScramController

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

Constructs the ScramController with the necessary service.

Parameters

producerService

ProducerService

The service to handle creation and queueing of quantification jobs.

storageService

StorageService

The service to retrieve quantified reports

Returns

ScramController

Methods

createAndQueueQuant()

createAndQueueQuant(quantRequest): void

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

Endpoint to create and queue a quantification job for SCRAM.

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/scram.controller.ts:48

Controller method to handle GET requests for quantified reports at the "/scram" 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.