ac-bootstrap-bull 2.0.1 → 2.0.3

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/index.js +10 -1
  3. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,3 +1,23 @@
1
+ <a name="2.0.3"></a>
2
+
3
+ ## [2.0.3](https://github.com/admiralcloud/ac-bootstrap-bull/compare/v2.0.2..v2.0.3) (2023-05-14 17:47:59)
4
+
5
+
6
+ ### Bug Fix
7
+
8
+ * **App:** Updated packages | MP | [b8cc41b464913e12b81ed05532252a7a6cc6076c](https://github.com/admiralcloud/ac-bootstrap-bull/commit/b8cc41b464913e12b81ed05532252a7a6cc6076c)
9
+ Updated packages
10
+ Related issues: [/issues#undefined](https://github.com//issues/undefined)
11
+ <a name="2.0.2"></a>
12
+
13
+ ## [2.0.2](https://github.com/admiralcloud/ac-bootstrap-bull/compare/v2.0.1..v2.0.2) (2023-03-12 20:18:16)
14
+
15
+
16
+ ### Bug Fix
17
+
18
+ * **App:** Improved READY logging | MP | [0eefda845de3b7cacf6c15ce20954a09eb6442bd](https://github.com/admiralcloud/ac-bootstrap-bull/commit/0eefda845de3b7cacf6c15ce20954a09eb6442bd)
19
+ Log as silly by default, log as debug if type had an error before.
20
+ Related issues: [undefined/undefined#master](undefined/browse/master)
1
21
  <a name="2.0.1"></a>
2
22
 
3
23
  ## [2.0.1](https://github.com/admiralcloud/ac-bootstrap-bull/compare/v2.0.0..v2.0.1) (2023-02-20 19:06:02)
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
- acapi.log.debug('BULL/REDIS | Ready | %s', type)
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ac-bootstrap-bull",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Bull helper",
5
5
  "repository": "admiralcloud/ac-bootstrap-bull",
6
6
  "author": "Mark Poepping <mark.poepping@admiralcloud.com>",
@@ -9,10 +9,10 @@
9
9
  "ac-redislock": "^3.0.0",
10
10
  "async": "^3.2.4",
11
11
  "bull": "^4.10.4",
12
- "ioredis": "^5.3.1",
12
+ "ioredis": "^5.3.2",
13
13
  "lodash": "^4.17.21"
14
14
  },
15
15
  "devDependencies": {
16
- "eslint": "^8.34.0"
16
+ "eslint": "^8.40.0"
17
17
  }
18
18
  }