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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tommeier
Copy link
Collaborator

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

…or, 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.
@tommeier
Copy link
Collaborator Author

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

@geomic
Copy link

geomic commented May 16, 2012

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'

@jaredmoody
Copy link

+1

3 similar comments
@jcole
Copy link

jcole commented Jun 7, 2012

+1

@thawatchai
Copy link

+1

@juno
Copy link

juno commented Jun 24, 2012

👍

@tommeier
Copy link
Collaborator Author

tommeier commented Jul 2, 2012

Updated : Now use this branch for Paperclip 3.1.2 +

#69

So in gemfile :

gem 'delayed_paperclip'    , '2.4.5.2', :git => 'git://github.com/tommeier/delayed_paperclip', :branch => 'fix_312'

@kevTheDev
Copy link

+1

@ghost
Copy link

ghost commented Jul 16, 2012

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?

@wQwRtaufxJw7UFLCXzXz
Copy link

Thanks tommeier.

@chrise86
Copy link

Thanks @tommeier - worked for me! :)

jrgifford referenced this pull request in jrgifford/delayed_paperclip Oct 11, 2012
@tibbon
Copy link

tibbon commented Jan 10, 2013

+1 for a merge?

@jrgifford
Copy link

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

@tibbon
Copy link

tibbon commented Jan 10, 2013

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//pull/62#issuecomment-12096886.

malandrina pushed a commit to hoteltonight/delayed_paperclip that referenced this pull request Feb 21, 2014
Fix for when attachment is set on a parent class (eg ActiveRecords STI)
The only_process was nil which wasn't being checked against [] very well
only_process now defaults to []
malandrina pushed a commit to hoteltonight/delayed_paperclip that referenced this pull request Feb 21, 2014
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.