@chevre/domain 22.11.0-alpha.18 → 22.11.0-alpha.19
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.
|
@@ -3,26 +3,32 @@ import * as mongoose from 'mongoose';
|
|
|
3
3
|
|
|
4
4
|
import { chevre } from '../../../../lib/index';
|
|
5
5
|
|
|
6
|
+
const { INFORM_TASK_AGG_URL } = process.env;
|
|
7
|
+
if (typeof INFORM_TASK_AGG_URL !== 'string') {
|
|
8
|
+
throw new Error('INFORM_TASK_AGG_URL required');
|
|
9
|
+
}
|
|
10
|
+
|
|
6
11
|
async function main() {
|
|
7
12
|
await mongoose.connect(<string>process.env.MONGOLAB_URI, { autoIndex: false });
|
|
8
13
|
|
|
9
14
|
const settingRepo = await chevre.repository.Setting.createInstance(mongoose.connection);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
// const setting = await settingRepo.findOne({ project: { id: { $eq: '*' } } }, ['onTaskStatusChanged']);
|
|
16
|
+
// update
|
|
17
|
+
await settingRepo.updateByProject(
|
|
18
|
+
{ project: { id: { $eq: '*' } } },
|
|
19
|
+
{
|
|
20
|
+
onTaskStatusChanged: {
|
|
21
|
+
informTask: [{
|
|
22
|
+
recipient: {
|
|
23
|
+
name: 'Aggregation Service',
|
|
24
|
+
url: INFORM_TASK_AGG_URL
|
|
25
|
+
}
|
|
26
|
+
}],
|
|
27
|
+
informTaskNames: []
|
|
21
28
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
console.log('updated.');
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
main()
|
|
@@ -14,6 +14,7 @@ const schemaDefinition = {
|
|
|
14
14
|
onEventChanged: mongoose_1.SchemaTypes.Mixed,
|
|
15
15
|
onOrderStatusChanged: mongoose_1.SchemaTypes.Mixed,
|
|
16
16
|
onReservationStatusChanged: mongoose_1.SchemaTypes.Mixed,
|
|
17
|
+
onTaskStatusChanged: mongoose_1.SchemaTypes.Mixed,
|
|
17
18
|
onResourceUpdated: mongoose_1.SchemaTypes.Mixed,
|
|
18
19
|
onTransactionStatusChanged: mongoose_1.SchemaTypes.Mixed,
|
|
19
20
|
quota: mongoose_1.SchemaTypes.Mixed,
|
package/package.json
CHANGED