mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
wip: Change the pre-conditions for cancelling test runs
This commit is contained in:
parent
9e121a3654
commit
d5ab0078d3
|
@ -1,4 +1,5 @@
|
|||
import config from '@/config';
|
||||
import { InstanceSettings } from 'n8n-core';
|
||||
|
||||
import { TestRunRepository } from '@/databases/repositories/test-run.repository.ee';
|
||||
import { Delete, Get, Post, RestController } from '@/decorators';
|
||||
import { ConflictError } from '@/errors/response-errors/conflict.error';
|
||||
|
@ -17,6 +18,7 @@ export class TestRunsController {
|
|||
private readonly testDefinitionService: TestDefinitionService,
|
||||
private readonly testRunRepository: TestRunRepository,
|
||||
private readonly testRunnerService: TestRunnerService,
|
||||
private readonly instanceSettings: InstanceSettings,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@ -88,8 +90,8 @@ export class TestRunsController {
|
|||
|
||||
@Post('/:testDefinitionId/runs/:id/cancel')
|
||||
async cancel(req: TestRunsRequest.Cancel) {
|
||||
if (config.getEnv('executions.mode') === 'queue') {
|
||||
throw new NotImplementedError('Cancelling test runs is not yet supported in queue mode');
|
||||
if (this.instanceSettings.isMultiMain) {
|
||||
throw new NotImplementedError('Cancelling test runs is not yet supported in multi-main mode');
|
||||
}
|
||||
|
||||
const { id: testRunId } = req.params;
|
||||
|
|
Loading…
Reference in a new issue