From 14329b2eb44f47a68120fc08c377902d7ec6894f Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Mon, 1 Mar 2021 12:55:01 +0100 Subject: [PATCH] :bug: Fixed an issue with current executing workflows when using queues (#1483) When running n8n in queue mode, the query to search for currently running workflows would fail on Postgres but work fine with SQLite and MySQL / MariaDB. This fix makes it work fine for all RDBMS. --- packages/cli/src/Server.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/cli/src/Server.ts b/packages/cli/src/Server.ts index aed8de09a0..4b4e376a83 100644 --- a/packages/cli/src/Server.ts +++ b/packages/cli/src/Server.ts @@ -1647,6 +1647,10 @@ class App { const currentlyRunningExecutionIds = currentJobs.map(job => job.data.executionId); + if (currentlyRunningExecutionIds.length === 0) { + return []; + } + const resultsQuery = await Db.collections.Execution! .createQueryBuilder("execution") .select([