Browse Source

clickhouse params

release_0.0.2
巴林闲侠 2 years ago
parent
commit
68277930eb
  1. 5
      api/.vscode/launch.json
  2. 1
      api/app/lib/controllers/organization/index.js
  3. 22
      api/config.js

5
api/.vscode/launch.json

@ -28,6 +28,11 @@
"--qnbkt dev-operational-service",
// "--qndmn http://resources.anxinyun.cn",
"--qndmn http://rhvqdivo5.hn-bkt.clouddn.com",
"--clickHouseUrl http://10.8.30.71",
"--clickHousePort 30123",
"--clickHouseAnxincloudDB anxinyun",
"--clickHousePepEmisDB anxinyun",
"--clickHouseProjectManageDB anxinyun",
]
},
{

1
api/app/lib/controllers/organization/index.js

@ -43,6 +43,7 @@ async function editUser (ctx) {
if (existUserRes) {
// 存在且传递id 或者 不传id也存在
// 修改 update
storageData.deleted = false
if (
role.includes('admin')
) {

22
api/config.js

@ -66,20 +66,11 @@ const QINIU_AK = process.env.ANXINCLOUD_QINIU_ACCESSKEY || flags.qnak;
const QINIU_SK = process.env.ANXINCLOUD_QINIU_SECRETKEY || flags.qnsk;
// clickHouse
const CLICKHOUST_URL = rocess.env.CLICKHOUST_URL || flags.clickHouseUrl
const CLICKHOUST_PORT = rocess.env.CLICKHOUST_PORT || flags.clickHousePort
const CLICKHOUST_ANXINCLOUD_DB = rocess.env.CLICKHOUST_ANXINCLOUD_DB || flags.clickHouseAnxincloudDB
const CLICKHOUST_PEPEMIS_DB = rocess.env.CLICKHOUST_PEPEMIS_DB || flags.clickHousePepEmisDB
const CLICKHOUST_PROJECT = rocess.env.CLICKHOUST_PORT || flags.clickHousePort
console.log('params', POMS_DB,
IOTA_REDIS_SERVER_HOST, IOTA_REDIS_SERVER_PORT,
GOD_KEY,
API_ANXINYUN_URL,
API_EMIS_URL,
QINIU_DOMAIN_QNDMN_RESOURCE, QINIU_BUCKET_RESOURCE, QINIU_AK, QINIU_SK
);
const CLICKHOUST_URL = process.env.CLICKHOUST_URL || flags.clickHouseUrl
const CLICKHOUST_PORT = process.env.CLICKHOUST_PORT || flags.clickHousePort
const CLICKHOUST_ANXINCLOUD_DB = process.env.CLICKHOUST_ANXINCLOUD_DB || flags.clickHouseAnxincloudDB
const CLICKHOUST_PEP_EMIS_DB = process.env.CLICKHOUST_PEP_EMIS_DB || flags.clickHousePepEmisDB
const CLICKHOUST_PROJECT_MANAGE_DB = process.env.CLICKHOUST_PROJECT_MANAGE_DB || flags.clickHouseProjectManageDB
if (
!POMS_DB ||
@ -87,7 +78,8 @@ if (
!GOD_KEY ||
!API_ANXINYUN_URL ||
!API_EMIS_URL ||
!QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK
!QINIU_DOMAIN_QNDMN_RESOURCE || !QINIU_BUCKET_RESOURCE || !QINIU_AK || !QINIU_SK ||
!CLICKHOUST_URL || !CLICKHOUST_PORT || !CLICKHOUST_ANXINCLOUD_DB || !CLICKHOUST_PEP_EMIS_DB || !CLICKHOUST_PROJECT_MANAGE_DB
) {
console.log('缺少启动参数,异常退出');
args.showHelp();

Loading…
Cancel
Save