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

image_processing set to false before s3 write finishes #71

Open
jaredmoody opened this issue Oct 17, 2012 · 6 comments
Open

image_processing set to false before s3 write finishes #71

jaredmoody opened this issue Oct 17, 2012 · 6 comments

Comments

@jaredmoody
Copy link

I'm occasionally getting 406 responses from s3 after requesting an image that just finished processing. I put in debug lines in paperclip/storage/s3.rb flush_writes and delayed_paperclip/attachment.rb post_process_styles_with_processing and it looks to me like the _processing column is getting set to false just before the writes are flushed to s3, which seems like a bug to me.

Has anyone else seen this happening? Not sure what the best approach is here as I'm not too familiar with paperclip internals and not sure if this is a paperclip or delayed_paperclip problem.

I'm using ree-1.8.7-2012.02, paperclip 2.7.1, and delayed_paperclip 2.4.5.2

@jrgifford
Copy link

It might be a paperclip problem, we are running a ancient version of paperclip right now. I'm working on updating paperclip to 3.0, so this might resolve the problem.

Can you try this branch?

@jaredmoody
Copy link
Author

I can't use the paperclip 3 branch since I'm not on ruby 1.9.3 yet, so until then I'm on paperclip 2.7.1. Should I try the master branch from your fork or is that the same as 2.4.5.2?

@jaredmoody
Copy link
Author

Here's a solution that's working for me:

elevation@15c670a

I just changed the alias method chain to hook into after_flush_writes instead of post_process_styles.

That work?

@jrgifford
Copy link

Master is (with a few minor diffs) the same as the current release.

Also, that gist is deleted - can you repost?

@jaredmoody
Copy link
Author

I updated my post to point to the commit in my fork, sorry about that. Refresh?

@jrgifford
Copy link

Ah, ok. I see it now. Thanks!

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

No branches or pull requests

2 participants