@steedos/service-fields-indexs 2.2.36 → 2.2.39
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.
- package/meteor-collection-indexs/flows.object.js +7 -10
- package/meteor-collection-indexs/forms.object.js +7 -10
- package/meteor-collection-indexs/instances.object.js +10 -25
- package/meteor-collection-indexs/organizations.object.js +8 -5
- package/meteor-collection-indexs/users.object.js +11 -20
- package/package.json +2 -2
- package/package.service.js +5 -1
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "2.2.39",
|
|
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": "
|
|
13
|
+
"gitHead": "9b26b926ccd65fc82b12bf2b8fec070f222f3c7a"
|
|
14
14
|
}
|
package/package.service.js
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|