Commit 86d0ecdf by Jon Yurek

Removed broken backgrounding

parent 1f6292ad
...@@ -36,7 +36,6 @@ module Paperclip ...@@ -36,7 +36,6 @@ module Paperclip
@storage = options[:storage] @storage = options[:storage]
@whiny = options[:whiny_thumbnails] @whiny = options[:whiny_thumbnails]
@convert_options = options[:convert_options] || {} @convert_options = options[:convert_options] || {}
@background = options[:background].nil? ? instance.respond_to?(:spawn) : options[:background]
@processors = options[:processors] || [:thumbnail] @processors = options[:processors] || [:thumbnail]
@options = options @options = options
@queued_for_delete = [] @queued_for_delete = []
...@@ -334,11 +333,9 @@ module Paperclip ...@@ -334,11 +333,9 @@ module Paperclip
def post_process #:nodoc: def post_process #:nodoc:
return if @queued_for_write[:original].nil? return if @queued_for_write[:original].nil?
background do return if fire_events(:before)
return if fire_events(:before) post_process_styles
post_process_styles return if fire_events(:after)
return if fire_events(:after)
end
end end
def fire_events(which) def fire_events(which)
...@@ -362,16 +359,6 @@ module Paperclip ...@@ -362,16 +359,6 @@ module Paperclip
end end
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: def callback which #:nodoc:
instance.run_callbacks(which, @queued_for_write){|result, obj| result == false } instance.run_callbacks(which, @queued_for_write){|result, obj| result == false }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment