Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implicit count implementation #644

Closed
etiennebarrie opened this issue Jun 2, 2022 · 0 comments · Fixed by #698
Closed

Implicit count implementation #644

etiennebarrie opened this issue Jun 2, 2022 · 0 comments · Fixed by #698
Assignees
Milestone

Comments

@etiennebarrie
Copy link
Member

We've moved main to prepare a future v2.0.0, mainly by removing deprecated code. One thing we hadn't tackled in order to preserve compatibility is implicit count method for tasks.

If you don't define a count method in your task, we show indeterminate progress in the general case, with exceptions:

  • CSV and CSV batches
  • Active Record batches

We could extend that, and prevent a lot of implementations of count which are just collection.size. Also that would avoid calling collection twice in a lot of cases (once in build_enumerator and once in count).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants