2023-11-14 20:44:06 +03:00
|
|
|
import { Result } from "../../../core/helper/result";
|
2023-11-20 00:48:40 +03:00
|
|
|
import { ActivePipeline } from "../../../core/model/active_pipeline_model";
|
2023-11-14 20:44:06 +03:00
|
|
|
import { pipelineRealTimeService } from "../realtime_presentation";
|
|
|
|
|
|
|
|
export class PipelineStatusUseCase {
|
2023-11-20 00:48:40 +03:00
|
|
|
async call(): Promise<Result<Error, ActivePipeline>> {
|
2023-11-14 20:44:06 +03:00
|
|
|
try {
|
|
|
|
return Result.ok(pipelineRealTimeService.status);
|
|
|
|
} catch (error) {
|
|
|
|
return Result.error(error as Error);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|