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

Call generator function for each loop #74

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

afbora
Copy link
Member

@afbora afbora commented Feb 27, 2024

Fixes

@afbora afbora added the type: bug 🐛 Is a bug; fixes a bug label Feb 27, 2024
@afbora afbora added this to the 1.4.0 milestone Feb 27, 2024
@afbora afbora requested review from distantnative and a team February 27, 2024 12:43
@afbora afbora self-assigned this Feb 27, 2024
@afbora afbora linked an issue Feb 27, 2024 that may be closed by this pull request
@distantnative
Copy link
Member

So the initial idea of generators is not to have all in memory as this might exceed the available memory with big indexes. Which I guess this PR would force all into memory again. But I also don't have a good understanding yet why that bug is happening.

@afbora
Copy link
Member Author

afbora commented Feb 27, 2024

Understand the idea. I'll take a look again.

@afbora afbora force-pushed the fix/72-clean-content branch from c0a788f to 4eec997 Compare February 27, 2024 17:26
@afbora afbora changed the title Copy the iterator into an array Call generator function for each loop Feb 27, 2024
@afbora
Copy link
Member Author

afbora commented Feb 27, 2024

I've pushed correct fix. We should call kirby models (generator function) for each loop since generators cannot be cloned. Otherwise run into an exception: Cannot traverse an already closed generator

@bastianallgeier bastianallgeier merged commit 73827af into develop Feb 28, 2024
10 checks passed
@bastianallgeier bastianallgeier deleted the fix/72-clean-content branch February 28, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Is a bug; fixes a bug
Development

Successfully merging this pull request may close these issues.

clean:content throws exception on translations
3 participants