gitfoss | 76fa798d00614f356f12b47b1582c87780ea9288 | app/services/pipelines/cancelRunner.ts ∙ GitFOSS
.ts
TypeScript
(application/typescript)
// 1st-party
import type { ServiceMethodFactory } from "@ethicdevs/react-monolith";
import type { PipelineServiceDeps } from "./types";

const makeCancelRunner: ServiceMethodFactory<
  PipelineServiceDeps,
  [string],
  Promise<any>
> = ({ runner }) => {
  return async (pipelineId: string) => {
    return runner.cancelRun(pipelineId);
  };
};

export default makeCancelRunner;