getkirby / cli

Kirby Command Line Interface
MIT License
51 stars 5 forks source link

Call generator function for each loop #74

Closed afbora closed 6 months ago

afbora commented 6 months ago

Fixes

distantnative commented 6 months ago

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 commented 6 months ago

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

afbora commented 6 months ago

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