Skip to content

Commit

Permalink
stilgar - autopause workflows for programmatic workflow control (#1503)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal authored Mar 19, 2024
1 parent 63cb1bc commit 5ee991b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 43 deletions.
3 changes: 3 additions & 0 deletions flow/workflows/qrep_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,9 @@ func QRepFlowWorkflow(
if err != nil {
return nil
}
// we don't want to leave this workflow with unhandled signals, but ignoring results
signalChan.Drain()
state.CurrentFlowStatus = protos.FlowStatus_STATUS_PAUSED
return workflow.NewContinueAsNewError(ctx, QRepFlowWorkflow, config, state)
}
logger.Info("initial copy completed for peer flow")
Expand Down
2 changes: 1 addition & 1 deletion ui/app/mirrors/create/helpers/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const blankSnowflakeQRepSetting = {
watermarkTable: '',
watermarkColumn: '',
maxParallelWorkers: 4,
waitBetweenBatchesSeconds: 30,
waitBetweenBatchesSeconds: 2,
writeMode: {
writeType: QRepWriteType.QREP_WRITE_MODE_OVERWRITE,
} as QRepWriteMode,
Expand Down
42 changes: 0 additions & 42 deletions ui/app/mirrors/create/qrep/snowflakeQrep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,48 +38,6 @@ export default function SnowflakeQRepForm({
Query replication mirrors with Snowflake source supports only
overwrite, full-refresh mode.
</Callout>
<div>
<Label>
Refresh interval is the time (in seconds) intervals at which new
rows will be pulled for replication.
</Label>
<RowWithTextField
label={
<Label>
Refresh Interval
<Tooltip
style={{ width: '100%' }}
content={'This is a required field.'}
>
<Label colorName='lowContrast' colorSet='destructive'>
*
</Label>
</Tooltip>
</Label>
}
action={
<div
style={{
display: 'flex',
flexDirection: 'row',
alignItems: 'center',
}}
>
<TextField
variant='simple'
type={'number'}
defaultValue={mirrorConfig.waitBetweenBatchesSeconds}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
setter((curr) => ({
...curr,
waitBetweenBatchesSeconds: e.target.valueAsNumber,
}))
}
/>
</div>
}
/>
</div>
<TableMapping
sourcePeerName={mirrorConfig.sourcePeer?.name}
rows={rows}
Expand Down

0 comments on commit 5ee991b

Please sign in to comment.