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

Method handleNewChanges

packages/core/src/engine/engine.ts:311–323  ·  view source on GitHub ↗

* The backend actively pushes changesets submitted by others * Or actively compensate for missing versions of changeset

(data: IRemoteChangeset)

Source from the content-addressed store, hash-verified

309 * Or actively compensate for missing versions of changeset
310 */
311 async handleNewChanges(data: IRemoteChangeset) {
312 console.log('Received remote Changeset: ', { data });
313 const loading = this.getNetworking().loading;
314 if (loading) {
315 Player.doTrigger(Events.app_error_logger, {
316 error: new Error('receive newChanges while datasheet loading, ignored'),
317 });
318 return;
319 }
320
321 await this.checkMissChanges(data.revision);
322 this.applyNewChanges(data);
323 }
324
325 private applyNewChanges(cs: IRemoteChangeset) {
326 // Receive newChanges from itself. This happens because the client disconnects and reconnects,

Callers

nothing calls this directly

Calls 3

checkMissChangesMethod · 0.95
applyNewChangesMethod · 0.95
logMethod · 0.45

Tested by

no test coverage detected