You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Allow sync to be cancelled when in progress (#1334)
In some cases, when the resource channel is processing a large collection of objects, the sync process can continue even if the context cancel has been triggered. This is problematic for billing and usage since a sync can significantly overshoot the remaining rows quota. To allow an in-progress sync to abort quicker, we need to modify a number of channel patterns from using `range` to using `select` - which will allow the `context.Done` channel to be monitored.
This PR also adds the `OnSyncFinisher` hook which is called when the sync has finished adding messages. This allows the client code to call the batch updater close method without missing any updates.
fixes: cloudquery/cloudquery-issues#750
0 commit comments