You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wondering if loopback.getCurrentContext() actually works dependably and what the issues are. We've had non-stop problems with storing/pulling context using any sort of mechanism similar to the way that loopback.getCurrentContext() appears to work. Why? Various reasons; including everyone/every module using different Promise implementations, some of which play nicely with domains, other which don't. Native Promises don't seem to play nicely using domains.
I see various commentary here regarding loopback here, but not sure where it stands exactly how to resolve: /issues/878
whoGloo/loopback-jwt/pull/2
Thanks, glad I asked and thank you for the clear answer: loopback.getCurrentContext() uses CLS. CLS is definitely not dependable and context breaks in many places (I documented a bit of that here: nodejs/node#66).
Reviewed the solution. CLS doesn't work. Domains don't work. Both break under quite a variety of conditions. This looks like a great way to get context always injected down into the models. @
Wondering if loopback.getCurrentContext() actually works dependably and what the issues are. We've had non-stop problems with storing/pulling context using any sort of mechanism similar to the way that loopback.getCurrentContext() appears to work. Why? Various reasons; including everyone/every module using different Promise implementations, some of which play nicely with domains, other which don't. Native Promises don't seem to play nicely using domains.
I see various commentary here regarding loopback here, but not sure where it stands exactly how to resolve:
/issues/878
whoGloo/loopback-jwt/pull/2
Also see my extensive comments/perspective on this issue:
nodejs/node/issues/66
The text was updated successfully, but these errors were encountered: