Skip to content

Commit

Permalink
fix: reconile job
Browse files Browse the repository at this point in the history
  • Loading branch information
adityathebe committed Jul 8, 2024
1 parent 0943601 commit 91d6725
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions jobs/sync_upstream.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ var ReconcileConfigs = &job.Job{
Fn: func(ctx job.JobRuntime) error {
ctx.History.ResourceType = job.ResourceTypeUpstream
ctx.History.ResourceID = api.UpstreamConfig.Host
count, fkFailed, err := upstream.ReconcileSome(ctx.Context, api.UpstreamConfig, ReconcilePageSize, tablesToReconcile...)
if err != nil {
ctx.History.AddError(err.Error())
summary := upstream.ReconcileSome(ctx.Context, api.UpstreamConfig, ReconcilePageSize, tablesToReconcile...)
ctx.History.AddDetails("summary", summary)
ctx.History.SuccessCount, ctx.History.ErrorCount = summary.GetSuccessFailure()
if summary.Error() != nil {
ctx.History.AddDetails("errors", summary.Error())
}
ctx.History.ErrorCount += fkFailed
ctx.History.SuccessCount += count

return nil
},
}
Expand Down

0 comments on commit 91d6725

Please sign in to comment.