ac-bootstrap-bull 2.0.0 → 2.0.2
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/.eslintrc.js +1 -1
- package/CHANGELOG.md +25 -0
- package/index.js +10 -1
- package/package.json +1 -1
package/.eslintrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
<a name="2.0.2"></a>
|
|
2
|
+
|
|
3
|
+
## [2.0.2](https://github.com/admiralcloud/ac-bootstrap-bull/compare/v2.0.1..v2.0.2) (2023-03-12 20:18:16)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fix
|
|
7
|
+
|
|
8
|
+
* **App:** Improved READY logging | MP | [0eefda845de3b7cacf6c15ce20954a09eb6442bd](https://github.com/admiralcloud/ac-bootstrap-bull/commit/0eefda845de3b7cacf6c15ce20954a09eb6442bd)
|
|
9
|
+
Log as silly by default, log as debug if type had an error before.
|
|
10
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
11
|
+
<a name="2.0.1"></a>
|
|
12
|
+
|
|
13
|
+
## [2.0.1](https://github.com/admiralcloud/ac-bootstrap-bull/compare/v2.0.0..v2.0.1) (2023-02-20 19:06:02)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Bug Fix
|
|
17
|
+
|
|
18
|
+
* **App:** Reduce loglevel for on-ready event | MP | [fe5f157c216df6b772184a89256a5581c25962aa](https://github.com/admiralcloud/ac-bootstrap-bull/commit/fe5f157c216df6b772184a89256a5581c25962aa)
|
|
19
|
+
Reduce loglevel for on-ready event
|
|
20
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
21
|
+
### Chores
|
|
22
|
+
|
|
23
|
+
* **App:** Updated ESLint to 2022 | MP | [ca64ed9ce691e79e8bd26e1096c475b34d432a2d](https://github.com/admiralcloud/ac-bootstrap-bull/commit/ca64ed9ce691e79e8bd26e1096c475b34d432a2d)
|
|
24
|
+
Updated ESLint to 2022
|
|
25
|
+
Related issues: [undefined/undefined#master](undefined/browse/master)
|
|
1
26
|
<a name="2.0.0"></a>
|
|
2
27
|
|
|
3
28
|
# [2.0.0](https://github.com/admiralcloud/ac-bootstrap-bull/compare/v1.0.14..v2.0.0) (2023-02-19 15:28:13)
|
package/index.js
CHANGED
|
@@ -60,13 +60,22 @@ module.exports = function(acapi) {
|
|
|
60
60
|
|
|
61
61
|
acapi.aclog.serverInfo(redisConf)
|
|
62
62
|
|
|
63
|
+
const errorHistory = {}
|
|
64
|
+
|
|
63
65
|
const createRedisClient = ({ config, type }) => {
|
|
64
66
|
const client = new Redis(config)
|
|
65
67
|
client.on('error', (err) => {
|
|
66
68
|
acapi.log.error('BULL/REDIS | Problem | %s | %s', type.padEnd(25), _.get(err, 'message'))
|
|
69
|
+
// remember error
|
|
70
|
+
_.set(errorHistory, type, _.get(err, 'message'))
|
|
67
71
|
})
|
|
68
72
|
client.on('ready', () => {
|
|
69
|
-
|
|
73
|
+
let level = 'silly'
|
|
74
|
+
if (_.get(errorHistory, type)) {
|
|
75
|
+
level = 'debug' // log after this type had an error
|
|
76
|
+
_.unset(errorHistory, type)
|
|
77
|
+
}
|
|
78
|
+
acapi.log[level]('BULL/REDIS | Ready | %s', type)
|
|
70
79
|
})
|
|
71
80
|
return client
|
|
72
81
|
}
|