Skip to content

Commit

Permalink
Use retryAfter() instead of static 10 sec delay for optimized & effic…
Browse files Browse the repository at this point in the history
…ient POST calls to create instances (#547)

Co-authored-by: Khaja Omer <[email protected]>
  • Loading branch information
komer3 and komer3 authored Oct 23, 2024
1 parent 7352134 commit 80572d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/linodemachine_controller_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,5 +706,5 @@ func createInstance(ctx context.Context, logger logr.Logger, machineScope *scope

machineScope.LinodeClient.OnAfterResponse(ctr.ApiResponseRatelimitCounter)
inst, err := machineScope.LinodeClient.CreateInstance(ctx, *createOpts)
return inst, time.Duration(reconciler.DefaultMachineControllerRetryDelay.Seconds()), err
return inst, ctr.RetryAfter(), err
}

0 comments on commit 80572d0

Please sign in to comment.