Skip to content

microservice-job-broker


Class: ExecutableController

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

HTTP controller for executable task operations.

Exposes endpoints to queue execution tasks and list executed task results.

Constructors

Constructor

new ExecutableController(executableService, executableStorageService): ExecutableController

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

Construct the controller with services for queueing and listing executable tasks.

Parameters

executableService

ExecutableService

Service to validate and enqueue executable tasks

executableStorageService

ExecutableStorageService

Service to retrieve executed task results from storage

Returns

ExecutableController

Methods

createAndQueueTask()

createAndQueueTask(taskRequest): Promise<void>

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

Create a new execution task.

Parameters

taskRequest

ExecutionTask

The task to execute.

Returns

Promise<void>

Boolean representing whether task was queued.


getExecutedTasks()

getExecutedTasks(): Promise<ExecutableJobReport[]>

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

Endpoint to retrieve a list of executed tasks and their results.

Returns

Promise<ExecutableJobReport[]>

A promise that resolves to an array of ExecutableJobReport, each representing an executed task.

Throws

NotFoundException When the executed tasks cannot be found or retrieved.