Skip to content

1.3.2: Defer throttle edge case optimization#148

Merged
sambostock merged 3 commits into
masterfrom
defer-throttle-edge-case-optimization
Nov 13, 2021
Merged

1.3.2: Defer throttle edge case optimization#148
sambostock merged 3 commits into
masterfrom
defer-throttle-edge-case-optimization

Conversation

@sambostock

@sambostock sambostock commented Nov 13, 2021

Copy link
Copy Markdown
Contributor

This reverts #87 and bumps the gem version to 1.3.2.

#87 turns out to break a some things, so we're reverting the change and re-publishing them in 2.0.0.

  • Couples ThrottleEnumerator to the Enumerator API, whereas previously any object responding to .each could be wrapped.
  • Checking for throttling before each iteration breaks certain throttle_on implementations which rely on being called after each iteration.

See this Slack discussion for details.

I have left the original test, but skipped it, following the pattern I used in #77.

@sambostock sambostock changed the title 1.3.2 :Defer throttle edge case optimization 1.3.2: Defer throttle edge case optimization Nov 13, 2021
@sambostock sambostock force-pushed the defer-throttle-edge-case-optimization branch from 1d22245 to 2e15d54 Compare November 13, 2021 04:40
@sambostock sambostock marked this pull request as ready for review November 13, 2021 04:41
@sambostock sambostock self-assigned this Nov 13, 2021
This customizable job is more reusable, for other scenarios such as passing in
non-Enumerator objects.
This optimization turns out to break backwards compatibility in two known ways:

- Couples ThrottleEnumerator to the Enumerator API, whereas previously any
  object responding to .each could be wrapped.
- Checking for throttling before each iteration breaks certain throttle_on
  implementations which rely on being called after each iteration.

Therefore, the change will be deferred until the next major version bump.
@sambostock sambostock merged commit b3ad940 into master Nov 13, 2021
@sambostock sambostock deleted the defer-throttle-edge-case-optimization branch November 13, 2021 18:43
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.

2 participants