mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Ensure that large changes are processed in full by triggers (for webhooks)
Summary: Uses the new alwaysPreserveColIds option for action summaries in Triggers.ts. Triggers.ts is now responsible for generating the summary to make it easy to pass this option. The value of the option is just all colIds mentioned in triggers configured in this document. Test Plan: Tested adding 200 rows to a subscribed table to ensure the events are not truncated. Also tests batching nicely. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3135
This commit is contained in:
@@ -14,8 +14,7 @@ import {shortDesc} from 'app/server/lib/shortDesc';
|
||||
import * as assert from 'assert';
|
||||
import {Mutex} from 'async-mutex';
|
||||
import * as Deque from 'double-ended-queue';
|
||||
import { ActionHistory, asActionGroup, getActionUndoInfo} from './ActionHistory';
|
||||
import {summarizeAction} from "./ActionSummary";
|
||||
import {ActionHistory, asActionGroup, getActionUndoInfo} from './ActionHistory';
|
||||
import {ActiveDoc} from './ActiveDoc';
|
||||
import {makeExceptionalDocSession, OptDocSession} from './DocSession';
|
||||
import {WorkCoordinator} from './WorkCoordinator';
|
||||
@@ -299,8 +298,7 @@ export class Sharing {
|
||||
}
|
||||
await this._activeDoc.processActionBundle(ownActionBundle);
|
||||
|
||||
const actionSummary = summarizeAction(localActionBundle);
|
||||
await this._activeDoc.handleTriggers(actionSummary);
|
||||
const actionSummary = await this._activeDoc.handleTriggers(localActionBundle);
|
||||
|
||||
// Broadcast the action to connected browsers.
|
||||
const actionGroup = asActionGroup(this._actionHistory, localActionBundle, {
|
||||
|
||||
Reference in New Issue
Block a user