github-script icon indicating copy to clipboard operation
github-script copied to clipboard

Add the ability to have a delay before retrying

Open mauriziovitale opened this issue 1 year ago • 5 comments

mauriziovitale avatar Mar 27 '23 15:03 mauriziovitale

It looks like there plugin-retry of octokit is using const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); as value for retry.

mauriziovitale avatar Mar 28 '23 11:03 mauriziovitale

Managed to override the retryAfterBaseValue to have a different delay

mauriziovitale avatar Mar 28 '23 11:03 mauriziovitale

It looks like there plugin-retry of octokit is using const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); as value for retry.

Could you explain your use case? When would you want a fixed retry delay instead of exponential delay?

joshmgross avatar Apr 04 '23 21:04 joshmgross

It looks like there plugin-retry of octokit is using const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); as value for retry.

Could you explain your use case? When would you want a fixed retry delay instead of exponential delay?

exponential is fine but I would like to have a starting point bigger than the default (1000) for example I want to retry a call after 1min / 2min / 4min especially if you know that a cluster can take time to go up.

mauriziovitale avatar Apr 05 '23 14:04 mauriziovitale

This feature would be useful. Is it planned to be merged?

RomaniukBohdan avatar Apr 04 '24 10:04 RomaniukBohdan