From 43e46d168e1f6c4fd50785f3c79f4e0244ffaef1 Mon Sep 17 00:00:00 2001 From: Pierre Brisorgueil Date: Fri, 17 Apr 2020 10:20:34 +0200 Subject: [PATCH] =?UTF-8?q?feat(apis):=20run=20worker=20auto=20if=20api=20?= =?UTF-8?q?auto=20request=20true=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/apis/services/apis.service.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/apis/services/apis.service.js b/modules/apis/services/apis.service.js index cbf7b24cd..687ab2636 100644 --- a/modules/apis/services/apis.service.js +++ b/modules/apis/services/apis.service.js @@ -218,9 +218,8 @@ exports.getAggregateApi = async (api, body) => { const result = await ApisRepository.getAggregateApi(api.slug, body); // check if no data return, then we probably have no data :) // ask for it ! - if (result.length === 0) { + if (result.length === 0 && api.autoRequest) { this.workerAuto(api, body, new Date()); - console.log('worker auto start', body); } return Promise.resolve(result); };