MCPcopy Create free account
hub / github.com/apitable/apitable / pushOpBuffer

Method pushOpBuffer

packages/core/src/engine/engine.ts:94–106  ·  view source on GitHub ↗

* Push the operation into the send queue, SyncEngine will ensure that the data is sent to the server in version order * And provide temporary local persistence capabilities to prevent users from losing data * in the case of accidental network disconnection and active refresh

(operation: IOperation)

Source from the content-addressed store, hash-verified

92 * in the case of accidental network disconnection and active refresh
93 */
94 pushOpBuffer(operation: IOperation) {
95 const _actions = this.viewPropertyFilter ?
96 this.viewPropertyFilter.parseActions(operation.actions, { commandName: operation.cmd as CollaCommandName }) :
97 operation.actions;
98 if (_actions.length) {
99 this.bufferStorage.pushOpBuffer({
100 ...operation,
101 actions: _actions,
102 revision: this.getRevision(),
103 resourceType: this.resourceType
104 });
105 }
106 }
107
108 /**
109 * Whether there is still unsent data

Callers 1

syncOperationsMethod · 0.45

Calls 2

parseActionsMethod · 0.80
getRevisionMethod · 0.45

Tested by

no test coverage detected