whistle.hedctestapi 1.1.1 → 1.1.9

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;
@@ -20,8 +20,8 @@ const appSettings = require('../config/app-settings');
20
20
 
21
21
 
22
22
  function findAll(filter) {
23
- logger.debug('begin to findAll');
24
- console.log('attrubute findAll filter:', filter);
23
+ logger.debug('begin to findAll', filter);
24
+ console.log('attrubute findAll filter:');
25
25
  if(filter && !filter instanceof Object){
26
26
  logger.error('filter is not object');
27
27
  return;
@@ -42,7 +42,7 @@ function findAll(filter) {
42
42
  }
43
43
 
44
44
  function remove(filter) {
45
- logger.debug('begin to remove');
45
+ logger.debug('begin to remove attrs by filter', filter);
46
46
  if (!filter) {
47
47
  return -1;
48
48
  }
@@ -88,6 +88,7 @@ async function findAllWithPage(params) {
88
88
  }
89
89
 
90
90
  function insertBatch(datas) {
91
+ logger.debug('begin to insertBatch', datas);
91
92
  attributeSchema.collection.insert(datas, onInsert);
92
93
  }
93
94
 
@@ -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.1",
3
+ "version": "1.1.9",
4
4
  "description": "he埋点测试插件api",
5
5
  "dependencies": {
6
6
  "@nohost/connect": "^1.2.1",