feat: support cls-hooked / tests#11584
Conversation
Codecov Report
@@ Coverage Diff @@
## master #11584 +/- ##
==========================================
- Coverage 96.26% 96.26% -0.01%
==========================================
Files 94 94
Lines 9191 9190 -1
==========================================
- Hits 8848 8847 -1
Misses 343 343
Continue to review full report at Codecov.
|
| // patch bluebird to bind all promise callbacks to CLS namespace | ||
| clsBluebird(ns, Promise); | ||
| Promise.config({ | ||
| asyncHooks: true |
There was a problem hiding this comment.
@sushantdhiman builtlin Promises automatically support async hooks right? Want to know if I need to replace this with something when we get rid of bluebird.
There was a problem hiding this comment.
Good question @jedwards1211, I don't know the answer, hopefully @sushantdhiman does. However, I'd guess that you could just try removing it, in theory we should have tests that fail if this stops working...
There was a problem hiding this comment.
@jedwards1211 No, you need to manually enable them, https://nodejs.com/api/async_hooks.html#async_hooks_promise_execution_tracking. But we don't need to enable anything. cls-hooked enable those api when namespace is created.
So no change will be required at sequelize level
Pull Request check-list
Please make sure to review and check all of these items:
npm run testornpm run test-DIALECTpass with this change (including linting)?Description of change