From 004cbbf8bc5e3a8d7f0b3ac6237d39ed351face9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?zhaobing=E2=80=99?= Date: Fri, 15 Sep 2023 09:13:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E8=A7=A3=E5=86=B3=E5=86=B2=E7=AA=81?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E9=94=99=E8=AF=AF=EF=BC=8C=E8=AF=AF=E5=88=A0?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/config.js | 40 ++++++++++++++++++---------------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/api/config.js b/api/config.js index b3a226d..4a64382 100644 --- a/api/config.js +++ b/api/config.js @@ -135,28 +135,24 @@ const ES_PLATFORM_NAME = process.env.ES_PLATFORM_NAME || flags.esPlatformName || 'anxinyun'; const ANXINCLOUD_ES_NODES_REST = process.env.ANXINCLOUD_ES_NODES_REST || flags.es; // //business_key -// const BUSINESS_KEY=process.env.BUSINESS_KEY||['834','840'] -if ( - // !BUSINESS_KEY|| - !FS_CAMUNDA_HOST || !FS_CAMUNDA_ROOT || - !POMS_DB - || !IOTA_REDIS_SERVER_HOST || !IOTA_REDIS_SERVER_PORT - || !ANXINCLOUD_KAFKA_BROKERS - || !GOD_KEY - || !API_ANXINYUN_URL - || !API_EMIS_URL - || !API_VCMP_URL - || !API_IOT_AUTH - || !QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK - || !CLICKHOUST_URL || !CLICKHOUST_PORT - || !CLICKHOUST_ANXINCLOUD || !CLICKHOUST_PEP_EMIS || !CLICKHOUST_PROJECT_MANAGE || !CLICKHOUST_VCMP || !CLICKHOUST_DATA_ALARM || !CLICKHOUST_IOT - // || !CLICKHOUST_CAM_WORKFLOW - || !CONFIRM_ALARM_ANXIN_USER_ID - || !VCMP_APP_ID || !VCMP_APP_SECRET -) { - console.log('缺少启动参数,异常退出'); - args.showHelp(); - process.exit(-1); +// const BUSINESS_KEY=process.env.BUSINESS_KEY||['160','161'] + +const requireParams = { + FS_CAMUNDA_HOST, FS_CAMUNDA_ROOT, + POMS_DB, + IOTA_REDIS_SERVER_HOST, IOTA_REDIS_SERVER_PORT, + ANXINCLOUD_KAFKA_BROKERS, + GOD_KEY, + API_ANXINYUN_URL, + API_EMIS_URL, + API_VCMP_URL, + API_IOT_AUTH, + QINIU_DOMAIN_QNDMN_RESOURCE, QINIU_BUCKET_RESOURCE, QINIU_AK, QINIU_SK, + CLICKHOUST_URL, CLICKHOUST_PORT, + CLICKHOUST_ANXINCLOUD, CLICKHOUST_PEP_EMIS, CLICKHOUST_PROJECT_MANAGE, CLICKHOUST_VCMP, CLICKHOUST_DATA_ALARM, CLICKHOUST_IOT, + // CLICKHOUST_CAM_WORKFLOW, + CONFIRM_ALARM_ANXIN_USER_ID, + VCMP_APP_ID, VCMP_APP_SECRET, } Object.keys(requireParams).forEach(key => {