Closed M1178475702 closed 3 years ago
I have watched your sameple, but there is onle one await function, i couldn't get some help from it. And sorry for my bad english if you think difficult to understand :-(
some cls test cases are here:
Hi @M1178475702 - looking at the latest example you've sent, I understand the problem you have is that you expect "1" instead of "undefined" in the console.log within func()
... I am sorry, but I cannot really think I can help here. I believe this is a question to be asked in jeff-lewis/cls-hooked github project.
Sorry I cannot help more than that.
Hi @M1178475702 - looking at the latest example you've sent, I understand the problem you have is that you expect "1" instead of "undefined" in the console.log within
func()
... I am sorry, but I cannot really think I can help here. I believe this is a question to be asked in jeff-lewis/cls-hooked github project.Sorry I cannot help more than that.
Thank you for reply:-) You are right that the problem should be placed in cls..but.. The reason I ased here is I think that you may encoutered similar problem when implement this problem.
In the final, thank you very much,
I'm using sequelize be the orm of my project, and i has implemented a Transactional decorator for sequelize with using cls which has similar function like yours. But in my using cases, i found some problems caused by cls. Something like this:
Actually, if you use cls, use ns.run (function of cls), when you use [await async func()] in the callback of ns.run, there will be ineffective after retured from await.
i want to get some helps about how you resolve the problem from you if you has encoutered it. Any help will be appriciated!