@ntalmagor/3drise-common 1.0.19 → 1.0.23
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/build/database.js +29 -10
- package/build/models/Project.d.ts +1 -0
- package/build/models/Project.js +4 -0
- package/package.json +1 -1
package/build/database.js
CHANGED
|
@@ -6,27 +6,46 @@ let _sequelize = null;
|
|
|
6
6
|
function getSequelize() {
|
|
7
7
|
if (!_sequelize) {
|
|
8
8
|
_sequelize = new sequelize_typescript_1.Sequelize({
|
|
9
|
-
database: process.env.RISE_MYSQL_DATABASE,
|
|
10
9
|
dialect: 'mysql',
|
|
10
|
+
database: process.env.RISE_MYSQL_DATABASE,
|
|
11
11
|
host: process.env.MYSQL_HOST,
|
|
12
12
|
username: process.env.RISE_MYSQL_USER,
|
|
13
13
|
password: process.env.RISE_MYSQL_PASSWORD,
|
|
14
14
|
port: parseInt(process.env.MYSQL_PORT || '3306'),
|
|
15
15
|
models: [],
|
|
16
16
|
logging: false,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
min: 0,
|
|
21
|
-
acquire: 30000,
|
|
22
|
-
idle: 10000,
|
|
17
|
+
define: {
|
|
18
|
+
timestamps: true,
|
|
19
|
+
underscored: false,
|
|
23
20
|
},
|
|
24
21
|
dialectOptions: {
|
|
25
|
-
connectTimeout:
|
|
22
|
+
connectTimeout: 120000, // 2 min for the initial TCP connect
|
|
23
|
+
},
|
|
24
|
+
pool: {
|
|
25
|
+
max: 15,
|
|
26
|
+
min: 0,
|
|
27
|
+
acquire: 120000, // 2 min to acquire a connection from the pool
|
|
28
|
+
idle: 30000, // close idle conns after 30s
|
|
29
|
+
evict: 5000, // sweep the pool every 5s
|
|
26
30
|
},
|
|
27
31
|
retry: {
|
|
28
|
-
max:
|
|
29
|
-
|
|
32
|
+
max: 5,
|
|
33
|
+
backoffBase: 1000, // 1s, doubles each retry (effectively)
|
|
34
|
+
backoffExponent: 1.5,
|
|
35
|
+
match: [
|
|
36
|
+
/ETIMEDOUT/,
|
|
37
|
+
/ECONNREFUSED/,
|
|
38
|
+
/ECONNRESET/,
|
|
39
|
+
/EAI_AGAIN/,
|
|
40
|
+
/PROTOCOL_CONNECTION_LOST/,
|
|
41
|
+
/SequelizeConnectionError/,
|
|
42
|
+
/SequelizeConnectionRefusedError/,
|
|
43
|
+
/SequelizeHostNotFoundError/,
|
|
44
|
+
/SequelizeHostNotReachableError/,
|
|
45
|
+
/SequelizeConnectionTimedOutError/,
|
|
46
|
+
/SequelizeConnectionAcquireTimeoutError/,
|
|
47
|
+
],
|
|
48
|
+
},
|
|
30
49
|
});
|
|
31
50
|
}
|
|
32
51
|
return _sequelize;
|
package/build/models/Project.js
CHANGED
|
@@ -58,6 +58,10 @@ __decorate([
|
|
|
58
58
|
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.UUID, field: 'post_processing_id' }),
|
|
59
59
|
__metadata("design:type", String)
|
|
60
60
|
], Project.prototype, "postProcessingId", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, sequelize_typescript_1.Column)({ type: sequelize_typescript_1.DataType.UUID, field: 'cursor_id' }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], Project.prototype, "cursorId", void 0);
|
|
61
65
|
__decorate([
|
|
62
66
|
(0, sequelize_typescript_1.Column)({
|
|
63
67
|
type: sequelize_typescript_1.DataType.ENUM(...Object.values(Asset_1.Privacy)),
|