Skip to content

Commit

Permalink
script may not define transform such as initial load for queues so no…
Browse files Browse the repository at this point in the history
… error

add ui
  • Loading branch information
serprex committed May 8, 2024
1 parent 2126789 commit d5ea065
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 2 additions & 6 deletions flow/activities/flowable_core.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,13 +364,9 @@ func (a *FlowableActivity) replicateQRepPartition(ctx context.Context,
return err
}
lfn := ls.Env.RawGetString("transformRow")
fn, ok := lfn.(*lua.LFunction)
if !ok {
err := fmt.Errorf("script should define `transformRow` as function, not %s", lfn)
a.Alerter.LogFlowError(ctx, config.FlowJobName, err)
return err
if fn, ok := lfn.(*lua.LFunction); ok {
outstream = pua.AttachToStream(ls, fn, stream)
}
outstream = pua.AttachToStream(ls, fn, stream)
}

var rowsSynced int
Expand Down
8 changes: 7 additions & 1 deletion ui/app/mirrors/create/helpers/qrep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,14 @@ export const qrepSettings: MirrorSetting[] = [
...curr,
waitBetweenBatchesSeconds: parseInt(value as string, 10) || 30,
})),
tips: 'Time to wait (in seconds) between getting partitions to process. The default is 30 seconds',
tips: 'Time to wait (in seconds) between getting partitions to process. The default is 30 seconds.',
default: 30,
type: 'number',
},
{
label: 'Script',
stateHandler: (value, setter) =>
setter((curr: QRepConfig) => ({ ...curr, script: value as string })),
tips: 'Script to use for row transformations. The default is no scripting.',
},
];

0 comments on commit d5ea065

Please sign in to comment.