whistle.hedctestapi 1.1.2 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,8 @@ const appSettingsDev = {
6
6
  get_apps_api: 'https://data.happyelements.cn/api/v1/app/all',
7
7
  };
8
8
  const appSettingsProd = {
9
- mongodb_url: 'mongodb://admin:123456@10.130.147.133:27017,10.130.147.133:27018,10.130.147.133:27019/nohost?replicaSet=2104011535&authSource=admin',
9
+ // mongodb_url: 'mongodb://admin:123456@10.130.147.133:27017,10.130.147.133:27018,10.130.147.133:27019/nohost?replicaSet=2104011535&authSource=admin',
10
+ mongodb_url: 'mongodb://admin:123456@10.130.80.21:27017/nohost',
10
11
  get_apps_api: 'https://data.happyelements.cn/api/v1/app/all',
11
12
  };
12
13
  const envConfig = {
@@ -14,7 +15,7 @@ const envConfig = {
14
15
  development: appSettingsDev,
15
16
  localdev: appSettingsDev
16
17
  };
17
- const env = envConfig[process.env.NODE_ENV] ? envConfig[process.env.NODE_ENV] : appSettingsDev;
18
+ const env = envConfig[process.env.NODE_ENV] ? envConfig[process.env.NODE_ENV] : appSettingsProd;
18
19
 
19
20
 
20
- module.exports = env;
21
+ module.exports = env;
@@ -42,7 +42,7 @@ function findAll(filter) {
42
42
  }
43
43
 
44
44
  function remove(filter) {
45
- logger.debug('begin to remove', filter);
45
+ logger.debug('begin to remove attrs by filter', filter);
46
46
  if (!filter) {
47
47
  return -1;
48
48
  }
@@ -34,7 +34,7 @@ function findOne(filter) {
34
34
  }
35
35
 
36
36
  function remove(filter) {
37
- logger.debug('begin to remove');
37
+ logger.debug('begin to remove events by filter', filter);
38
38
  if (!filter) {
39
39
  return -1;
40
40
  }
@@ -87,6 +87,7 @@ function getExcelObjs(ctx) {
87
87
  // return {status: 500, msg: msg}
88
88
  // }
89
89
  mongoXlsx.xlsx2MongoData(filePath, schemaModel, async (err, data) => {
90
+ logger.debug("begin to parse excel data",data);
90
91
  const filter = { appName: appName };
91
92
  await eventDao.remove(filter);
92
93
  await attributeDao.remove(filter);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whistle.hedctestapi",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "description": "he埋点测试插件api",
5
5
  "dependencies": {
6
6
  "@nohost/connect": "^1.2.1",