Closed coryt closed 8 years ago
+1 just stumbled upon this too using waterfall
- any hints on how to work arround this?
node 4.1.0, cls 3.1.4, async 0.9.2
Update: false alarm in my case.
My problem was not waterfall
but calling request
further down the line.
Fixed it by requiring continuation-local-storage
before anything else.
See #44
Thanks @mpseidel this lead to solving my issue as well. For the record, when requiring both async and cls, the order in which these are required matters so changing to the following resolves the issue.
var cls = require("continuation-local-storage");
var async = require("async");
Thanks! this saved my life just now. I've used express-http-context and express-jwt together. The latter uses async.
Hello, does the async.waterfall have to be inside ns.run for it to work? See https://github.com/othiym23/node-continuation-local-storage/issues/120
The CLS context seems to be lost during async waterfall or series functions. It does appear to be working with parallel.
Tested with
node 5.0.0
andnode 5.3.0
cls 3.1.4
async 1.5.0
Here is a simple test I've setup which fails on the 2nd waterfall function, the context is available within the 1st waterfall function. Am I doing something incorrect or is there an issue here?