Permalink
Browse files

Removed broken backgrounding

  • Loading branch information...
1 parent 1f6292a commit 86d0ecdf7ccfd75aac77d69a57c1425205e1bf7a @jyurek jyurek committed Feb 8, 2009
Showing with 3 additions and 16 deletions.
  1. +3 −16 lib/paperclip/attachment.rb
@@ -36,7 +36,6 @@ def initialize name, instance, options = {}
@storage = options[:storage]
@whiny = options[:whiny_thumbnails]
@convert_options = options[:convert_options] || {}
- @background = options[:background].nil? ? instance.respond_to?(:spawn) : options[:background]
@processors = options[:processors] || [:thumbnail]
@options = options
@queued_for_delete = []
@@ -334,11 +333,9 @@ def extra_options_for(style) #:nodoc:
def post_process #:nodoc:
return if @queued_for_write[:original].nil?
- background do
- return if fire_events(:before)
- post_process_styles
- return if fire_events(:after)
- end
+ return if fire_events(:before)
+ post_process_styles
+ return if fire_events(:after)
end
def fire_events(which)
@@ -362,16 +359,6 @@ def post_process_styles
end
end
- # When processing, if the spawn plugin is installed, processing can be done in
- # a background fork or thread if desired.
- def background(&blk)
- # if instance.respond_to?(:spawn) && @background
- # instance.spawn(&blk)
- # else
- blk.call
- # end
- end
-
def callback which #:nodoc:
instance.run_callbacks(which, @queued_for_write){|result, obj| result == false }
end

0 comments on commit 86d0ecd

Please sign in to comment.