backendtimecontext的initialize接口和domain完全兼容
This commit is contained in:
parent
cd87df4ff6
commit
8b32b7506e
|
|
@ -15,7 +15,7 @@ export declare abstract class BackendRuntimeContext<ED extends EntityDict & Base
|
|||
getSubscriberId(): string | undefined;
|
||||
getBriefEnvironment(): BriefEnv | undefined;
|
||||
protected getSerializedData(): Promise<SerializedData>;
|
||||
initialize(data?: SerializedData): Promise<void>;
|
||||
initialize(data?: SerializedData, later?: boolean): Promise<void>;
|
||||
/**
|
||||
* 未来可以支持在event中带id的占位符,到saveOpRecord时再动态注入 by Xc
|
||||
* @param operationId
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export class BackendRuntimeContext extends AsyncContext {
|
|||
ns: this.ns,
|
||||
};
|
||||
}
|
||||
async initialize(data) {
|
||||
async initialize(data, later) {
|
||||
if (data?.sid) {
|
||||
this.subscriberId = data.sid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export declare abstract class BackendRuntimeContext<ED extends EntityDict & Base
|
|||
getSubscriberId(): string | undefined;
|
||||
getBriefEnvironment(): BriefEnv | undefined;
|
||||
protected getSerializedData(): Promise<SerializedData>;
|
||||
initialize(data?: SerializedData): Promise<void>;
|
||||
initialize(data?: SerializedData, later?: boolean): Promise<void>;
|
||||
/**
|
||||
* 未来可以支持在event中带id的占位符,到saveOpRecord时再动态注入 by Xc
|
||||
* @param operationId
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class BackendRuntimeContext extends AsyncRowStore_1.AsyncContext {
|
|||
ns: this.ns,
|
||||
};
|
||||
}
|
||||
async initialize(data) {
|
||||
async initialize(data, later) {
|
||||
if (data?.sid) {
|
||||
this.subscriberId = data.sid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export abstract class BackendRuntimeContext<ED extends EntityDict & BaseEntityDi
|
|||
}
|
||||
}
|
||||
|
||||
async initialize(data?: SerializedData) {
|
||||
async initialize(data?: SerializedData, later?: boolean) {
|
||||
if (data?.sid) {
|
||||
this.subscriberId = data.sid;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue