Skip to content

Allow backoff to be specified via a proc#547

Merged
adrianna-chang-shopify merged 2 commits intomainfrom
backoff-as-proc
Dec 7, 2021
Merged

Allow backoff to be specified via a proc#547
adrianna-chang-shopify merged 2 commits intomainfrom
backoff-as-proc

Conversation

@adrianna-chang-shopify
Copy link
Contributor

Allow backoff to be provided via a callable object, rather than requiring a hardcoded ActiveSupport::Duration. This allows the backoff to be computed when the enumerator is being built, rather than being assigned when the task code is loaded.

This will facilitate removing some of the custom throttle enumerator usage in Shopify/shopify, allowing us to define the throttle conditions directly on a base task class.

@adrianna-chang-shopify adrianna-chang-shopify requested a review from a team December 6, 2021 16:32
Copy link
Member

@etiennebarrie etiennebarrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a tiny proposition to tweak the place we check for call.

@adrianna-chang-shopify adrianna-chang-shopify merged commit a0cfe8c into main Dec 7, 2021
@adrianna-chang-shopify adrianna-chang-shopify deleted the backoff-as-proc branch December 7, 2021 16:32
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems January 28, 2022 20:33 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants