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

Possible race condition when used with S3. #27

Open
melinath opened this issue Dec 19, 2012 · 1 comment
Open

Possible race condition when used with S3. #27

melinath opened this issue Dec 19, 2012 · 1 comment
Labels

Comments

@melinath
Copy link
Owner

I'm not entirely sure what's going on. Daguerre occasionally runs into an issue where a file that's been saved can't be immediately opened to find its dimensions. The cause seems to be a race condition between the save and open, perhaps due to propagation of the file across s3 instances?

I think the correct solution is to pre-cache the image dimensions (which we already know) on the ImageFileField instance.

@melinath
Copy link
Owner Author

That method won't work. At least not easily. FileFields explicitly reload their files when they're saved - which makes sense since it means that the filefield on the saved instance will actually be the file that exists in the wild. However, it means there's no way for us to intercept the new FieldFile without overriding the save method by creating a new FileField subclass. Which we could do.

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

No branches or pull requests

2 participants