refactor(server): standalone runtime module (#9120)
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
Config,
|
||||
mergeUpdatesInApplyWay as yotcoMergeUpdates,
|
||||
metrics,
|
||||
Runtime,
|
||||
} from '../../base';
|
||||
import { PermissionService } from '../permission';
|
||||
import { QuotaService } from '../quota';
|
||||
@@ -35,6 +36,7 @@ export class DocStorageOptions implements IDocStorageOptions {
|
||||
|
||||
constructor(
|
||||
private readonly config: Config,
|
||||
private readonly runtime: Runtime,
|
||||
private readonly permission: PermissionService,
|
||||
private readonly quota: QuotaService
|
||||
) {}
|
||||
@@ -43,9 +45,7 @@ export class DocStorageOptions implements IDocStorageOptions {
|
||||
const doc = await this.recoverDoc(updates);
|
||||
const yjsResult = Buffer.from(Y.encodeStateAsUpdate(doc));
|
||||
|
||||
const useYocto = await this.config.runtime.fetch(
|
||||
'doc/experimentalMergeWithYOcto'
|
||||
);
|
||||
const useYocto = await this.runtime.fetch('doc/experimentalMergeWithYOcto');
|
||||
|
||||
if (useYocto) {
|
||||
metrics.jwst.counter('codec_merge_counter').add(1);
|
||||
|
||||
Reference in New Issue
Block a user