delayed_paperclip
delayed_paperclip copied to clipboard
[Fix] most_appropiate_url changed to be part of Paperclip::UrlGenerator,...
... tested across rails versions and added Rails 3.2 to test suite. Paperclip version bumped to 2.7.
Main issue :
- attachment_updated_at was not being updated, new Paperclip (> 2.4.5) assigns the updated_at of the attachment, when S3 took too long, or the queue takes longer than a second to pick the image up, the attachment_updated_at and instance.updated_at get out of sync, and the url generated (with :updated_at in the hash_data - default), will not find the newly created images.
- Not sure the best way to write Test::Unit specs for this. It would need to forward time, between the queue picking up the initial saved image, then test to see that the images were both created, and the url exists... I guess it could be duped for a filestore by setting :updated_at in the @hash_data options or similar.
A month later this is still working perfectly in a production system with S3 delayed back ups via a Resque queue.
Works for me too (well done tommeier) - about time someone merges?!? Paperclip (which is active) has a reference to this gem (with its last push 4 months ago) in the Wiki - although clearly delayed_paperclip is currently incompatible with the latest Paperclip version.
Those interested in tommeier's commit can ref it from their Gemfile as such:
gem 'delayed_paperclip', :git => 'git://github.com/tommeier/delayed_paperclip.git', :ref => '98a8b9e0c24d24c94e2c9c39a704c1b07c5c4d6b'
+1
+1
+1
:+1:
Updated : Now use this branch for Paperclip 3.1.2 +
https://github.com/jstorimer/delayed_paperclip/pull/69
So in gemfile :
gem 'delayed_paperclip' , '2.4.5.2', :git => 'git://github.com/tommeier/delayed_paperclip', :branch => 'fix_312'
+1
Thanks, tommeier. Maybe we could update the gem at rubygems.org too, because this will be the most useful version for everybody using current paperclip & rails. What do you think?
Thanks tommeier.
Thanks @tommeier - worked for me! :)
+1 for a merge?
@tibbon it was merged into the new upstream. i adopted delayed_paperclip, so it's merged in. you can now update your gem.
Oh thanks! Just saw that while looking at the network. Trying to figure out how to get it working with Resque now, as "process_in_background :upload" seems to still execute on my web worker, not my resque worker.
On Thu, Jan 10, 2013 at 8:39 AM, James Gifford [email protected]:
@tibbon https://github.com/tibbon it was merged into the new upstreamhttps://github.com/jrgifford/delayed_paperclip/commit/45dd565af6db176e5b8b4c52b0d658ac835a8f3b. i adopted delayed_paperclip, so it's merged in. you can now update your gem.
— Reply to this email directly or view it on GitHubhttps://github.com/jstorimer/delayed_paperclip/pull/62#issuecomment-12096886.