Skip to content

Commit 0e755f2

Browse files
committed
Revert "Use fibers to store context"
This reverts commit 8f6d4c8.
1 parent 8f6d4c8 commit 0e755f2

File tree

4 files changed

+4
-68
lines changed

4 files changed

+4
-68
lines changed

ee/server/services/package-lock.json

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ee/server/services/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"ejson": "^2.2.2",
3434
"eventemitter3": "^4.0.7",
3535
"express": "^4.17.1",
36-
"fibers": "^5.0.0",
3736
"jaeger-client": "^3.18.1",
3837
"mem": "^8.1.1",
3938
"moleculer": "^0.14.14",
@@ -51,7 +50,6 @@
5150
"@types/cookie-parser": "^1.4.2",
5251
"@types/ejson": "^2.1.3",
5352
"@types/express": "^4.17.13",
54-
"@types/fibers": "^3.1.1",
5553
"@types/mongodb": "^3.6.19",
5654
"@types/node": "^14.17.4",
5755
"@types/ws": "^7.4.7",

server/sdk/index.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { IServiceContext } from './types/ServiceClass';
1+
import { AsyncLocalStorage } from 'async_hooks';
2+
23
import { proxify, proxifyWithWait } from './lib/proxify';
34
import { IAuthorization } from './types/IAuthorization';
5+
import { IServiceContext } from './types/ServiceClass';
46
import { IPresence } from './types/IPresence';
57
import { IAccount } from './types/IAccount';
68
import { ILicense } from './types/ILicense';
@@ -14,7 +16,6 @@ import { IRoomService } from './types/IRoomService';
1416
import { IMediaService } from './types/IMediaService';
1517
import { IAnalyticsService } from './types/IAnalyticsService';
1618
import { ILDAPService } from './types/ILDAPService';
17-
import { ContextStore } from './lib/ContextStore';
1819

1920
// TODO think in a way to not have to pass the service name to proxify here as well
2021
export const Authorization = proxifyWithWait<IAuthorization>('authorization');
@@ -35,4 +36,4 @@ export const LDAP = proxifyWithWait<ILDAPService>('ldap');
3536
// of service/method not available
3637
export const EnterpriseSettings = proxify<IEnterpriseSettings>('ee-settings');
3738

38-
export const asyncLocalStorage = new ContextStore<IServiceContext>();
39+
export const asyncLocalStorage = new AsyncLocalStorage<IServiceContext>();

server/sdk/lib/ContextStore.ts

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)