feat: add done status queue

pull/115/head
shancheas 2024-11-19 13:16:52 +07:00
parent eae529bce9
commit 9eacb7dca5
2 changed files with 12 additions and 0 deletions

View File

@ -32,4 +32,11 @@ export class QueueAdminOrchestrator {
await this.callManager.execute(); await this.callManager.execute();
return this.callManager.getResult(); return this.callManager.getResult();
} }
async done(dataId): Promise<string> {
this.callManager.setData(dataId, QUEUE_STATUS.DONE);
this.callManager.setService(this.service, TABLE_NAME.QUEUE);
await this.callManager.execute();
return this.callManager.getResult();
}
} }

View File

@ -56,4 +56,9 @@ export class QueueAdminController {
async call(@Param('id') id: string) { async call(@Param('id') id: string) {
return await this.orchestrator.call(id); return await this.orchestrator.call(id);
} }
@Post('queues/:id/done')
async done(@Param('id') id: string) {
return await this.orchestrator.done(id);
}
} }