@steedos/service-fields-indexs 2.2.35 → 2.2.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,12 @@
1
+ /*
2
+ * @Author: sunhaolin@hotoa.com
3
+ * @Date: 2022-02-28 09:25:03
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2022-05-29 11:41:22
6
+ * @Description:
7
+ */
1
8
  if (Meteor.isServer) {
2
9
 
3
- db.flows._ensureIndex({
4
- "is_deleted": 1
5
- }, {
6
- background: true
7
- });
8
- db.flows._ensureIndex({
9
- "space": 1
10
- }, {
11
- background: true
12
- });
13
10
  db.flows._ensureIndex({
14
11
  "space": 1,
15
12
  "is_deleted": 1
@@ -1,14 +1,11 @@
1
+ /*
2
+ * @Author: sunhaolin@hotoa.com
3
+ * @Date: 2022-02-28 09:25:03
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2022-05-29 11:40:25
6
+ * @Description:
7
+ */
1
8
  if (Meteor.isServer) {
2
- db.forms._ensureIndex({
3
- "is_deleted": 1
4
- }, {
5
- background: true
6
- });
7
- db.forms._ensureIndex({
8
- "space": 1
9
- }, {
10
- background: true
11
- });
12
9
  db.forms._ensureIndex({
13
10
  "space": 1,
14
11
  "is_deleted": 1
@@ -1,16 +1,14 @@
1
+ /*
2
+ * @Author: baozhoutao@hotoa.com
3
+ * @Date: 2022-02-28 09:25:03
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2022-05-29 11:46:57
6
+ * @Description:
7
+ */
1
8
  if (Meteor.isServer) {
2
9
  const objectql = require("@steedos/objectql");
3
10
  const config = objectql.getSteedosConfig();
4
- db.instances._ensureIndex({
5
- "space": 1
6
- }, {
7
- background: true
8
- });
9
- db.instances._ensureIndex({
10
- "is_deleted": 1
11
- }, {
12
- background: true
13
- });
11
+
14
12
  db.instances._ensureIndex({
15
13
  "submitter": 1
16
14
  }, {
@@ -47,11 +45,7 @@ if (Meteor.isServer) {
47
45
  }, {
48
46
  background: true
49
47
  });
50
- db.instances._ensureIndex({
51
- "created": 1
52
- }, {
53
- background: true
54
- });
48
+
55
49
  db.instances._ensureIndex({
56
50
  "_id": 1,
57
51
  "submit_date": 1
@@ -169,16 +163,7 @@ if (Meteor.isServer) {
169
163
  "submitter": 1,
170
164
  "applicant": 1
171
165
  }, Steedos.formatIndex(["is_deleted", "state", "space", "is_archive", "submitter", "applicant"]));
172
- db.instances._ensureIndex({
173
- "modified": 1
174
- }, {
175
- background: true
176
- });
177
- db.instances._ensureIndex({
178
- "modified": 1
179
- }, {
180
- background: true
181
- });
166
+
182
167
  db.instances._ensureIndex({
183
168
  "cc_users": 1
184
169
  }, {
@@ -1,10 +1,13 @@
1
+ /*
2
+ * @Author: baozhoutao@hotoa.com
3
+ * @Date: 2022-02-28 09:25:03
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2022-05-29 11:50:10
6
+ * @Description:
7
+ */
1
8
 
2
9
  if (Meteor.isServer) {
3
- db.organizations._ensureIndex({
4
- "space": 1
5
- }, {
6
- background: true
7
- });
10
+
8
11
  db.organizations._ensureIndex({
9
12
  "space": 1,
10
13
  "users": 1
@@ -1,9 +1,12 @@
1
+ /*
2
+ * @Author: baozhoutao@hotoa.com
3
+ * @Date: 2022-02-28 09:25:03
4
+ * @LastEditors: sunhaolin@hotoa.com
5
+ * @LastEditTime: 2022-05-29 11:46:03
6
+ * @Description:
7
+ */
1
8
  if (Meteor.isServer) {
2
- db.users._ensureIndex({
3
- "is_deleted": 1
4
- }, {
5
- background: true
6
- });
9
+
7
10
  db.users._ensureIndex({
8
11
  "email": 1
9
12
  }, {
@@ -65,11 +68,7 @@ if (Meteor.isServer) {
65
68
  }, {
66
69
  background: true
67
70
  });
68
- db.users._ensureIndex({
69
- "created": 1
70
- }, {
71
- background: true
72
- });
71
+
73
72
  db.users._ensureIndex({
74
73
  "last_logon": 1
75
74
  }, {
@@ -81,11 +80,7 @@ if (Meteor.isServer) {
81
80
  }, {
82
81
  background: true
83
82
  });
84
- db.users._ensureIndex({
85
- "name": 1
86
- }, {
87
- background: true
88
- });
83
+
89
84
  db.users._ensureIndex({
90
85
  "lastLogin": 1
91
86
  }, {
@@ -106,11 +101,7 @@ if (Meteor.isServer) {
106
101
  }, {
107
102
  background: true
108
103
  });
109
- db.users._ensureIndex({
110
- "steedos_id": 1
111
- }, {
112
- background: true
113
- });
104
+
114
105
  db.users._ensureIndex({
115
106
  "services.weixin.openid.appid": 1,
116
107
  "services.weixin.openid._id": 1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-fields-indexs",
3
- "version": "2.2.35",
3
+ "version": "2.2.38",
4
4
  "main": "package.service.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -10,5 +10,5 @@
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },
13
- "gitHead": "139844c50d5cfc93deb7928d6d29dc9a3cdb2c58"
13
+ "gitHead": "5e1bc5194e4a65dc19853ed0c948cea3dc5d01b7"
14
14
  }
@@ -91,10 +91,14 @@ module.exports = {
91
91
  */
92
92
  async started(ctx) {
93
93
  try {
94
+ let indexScheduleCron = "0 0 * * * *"; // 默认每小时执行一次
94
95
  const steedosConfig = objectql.getSteedosConfig() || {};
95
96
  const cron = steedosConfig.cron;
96
97
  if(cron && cron.build_index){
97
- this.job = schedule.scheduleJob(cron.build_index, ()=>{
98
+ indexScheduleCron = cron.build_index;
99
+ }
100
+ if (indexScheduleCron) {
101
+ this.job = schedule.scheduleJob(indexScheduleCron, ()=>{
98
102
  this.broker.call(`${serviceName}.refreshIndexes`)
99
103
  });
100
104
  }