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

Handle concurrency on download images, only store node id in cache #13

Merged
merged 4 commits into from
Nov 24, 2022

Conversation

maylukas
Copy link
Contributor

Awaiting creation of remote file nodes instead of returning after looping over them. Otherwise the creation of the remote file nodes might not be finished upon retrieving the data from the resolver.

Also, only store the node id in the cache & touch it to prevent garbage collection.

Copy link
Contributor

@freekrai freekrai left a comment

Choose a reason for hiding this comment

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

works fine from testing

gatsby-node.js Outdated Show resolved Hide resolved
Instead of downloading everything at once, let's try to do it in small chunks
@joselcvarela joselcvarela changed the title Race condition for image download, only store node id in cache Handle concurrency on download images, only store node id in cache Nov 23, 2022
Copy link
Contributor

@freekrai freekrai left a comment

Choose a reason for hiding this comment

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

LGTM

@freekrai freekrai merged commit 9afa8af into directus:main Nov 24, 2022
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.

None yet

4 participants