From 1f78d6dc0d71cd10cfe44779a99a9ed8885da468 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 17 Jan 2022 15:57:31 +0100 Subject: [PATCH] readding query thread timeout --- packages/server/src/api/controllers/query/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/query/index.js b/packages/server/src/api/controllers/query/index.js index 4096dd433f..21db1eebbf 100644 --- a/packages/server/src/api/controllers/query/index.js +++ b/packages/server/src/api/controllers/query/index.js @@ -9,8 +9,11 @@ const { Thread, ThreadType } = require("../../../threads") const { save: saveDatasource } = require("../datasource") const { RestImporter } = require("./import") const { invalidateDynamicVariables } = require("../../../threads/utils") +const environment = require("../../../environment") -const Runner = new Thread(ThreadType.QUERY, { timeoutMs: 10000 }) +const Runner = new Thread(ThreadType.QUERY, { + timeoutMs: environment.QUERY_THREAD_TIMEOUT || 10000, +}) // simple function to append "readable" to all read queries function enrichQueries(input) {