delayed_paperclip icon indicating copy to clipboard operation
delayed_paperclip copied to clipboard

[Fix] most_appropiate_url changed to be part of Paperclip::UrlGenerator,...

Open tommeier opened this issue 13 years ago • 14 comments

... 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.

tommeier avatar Mar 20 '12 06:03 tommeier

A month later this is still working perfectly in a production system with S3 delayed back ups via a Resque queue.

tommeier avatar Apr 17 '12 00:04 tommeier

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'

geomic avatar May 16 '12 16:05 geomic

+1

jaredmoody avatar May 31 '12 01:05 jaredmoody

+1

jcole avatar Jun 07 '12 03:06 jcole

+1

thawatchai avatar Jun 07 '12 11:06 thawatchai

:+1:

juno avatar Jun 24 '12 16:06 juno

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'

tommeier avatar Jul 02 '12 01:07 tommeier

+1

kevTheDev avatar Jul 10 '12 09:07 kevTheDev

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?

ghost avatar Jul 16 '12 21:07 ghost

Thanks tommeier.

wQwRtaufxJw7UFLCXzXz avatar Sep 05 '12 10:09 wQwRtaufxJw7UFLCXzXz

Thanks @tommeier - worked for me! :)

chrise86 avatar Sep 10 '12 10:09 chrise86

+1 for a merge?

tibbon avatar Jan 10 '13 13:01 tibbon

@tibbon it was merged into the new upstream. i adopted delayed_paperclip, so it's merged in. you can now update your gem.

jrgifford avatar Jan 10 '13 13:01 jrgifford

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.

tibbon avatar Jan 10 '13 13:01 tibbon