title: rails carrierwave backgrounder with delayed jobs taking too much time to upload
body: <p>I am using carrierwave and carrierwave backgrounder(<a href="https://github.com/lardawge/carrierwave_backgrounder" rel="nofollow">https://github.com/lardawge/carrierwave_backgrounder</a>) with delayed job for uploading file in a background.whernver i try to upload my file, it uploads successfully and i can see that jobs are executed in the background , but i cant see any difference with using delayed job and without using delayed job.it takes same time to execute without delayed job as it takes with delayed job.dont know what went wrong plz help.Thanks in advance.</p>
  
  <p>here is my Uploader</p>
  
  <pre><code>             # encoding: utf-8
  
          class AvatarUploader &lt; CarrierWave::Uploader::Base
  
            # Include RMagick or MiniMagick support:
            # include CarrierWave::RMagick
            # include CarrierWave::MiniMagick
  
            include ::CarrierWave::Backgrounder::Delay
            include Sprockets::Helpers::RailsHelper
  
            include Sprockets::Helpers::IsolatedHelper
           # Choose what kind of storage to use for this uploader:
             storage :file
             # storage :fog
  
          # Override the directory where uploaded files will be stored.
          # This is a sensible default for uploaders that are meant to be mounted:
          def store_dir
            "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
          end
  
         def cache_dir
             ""
         end
  
  
          # Provide a default URL as a default if there hasn't been a file uploaded:
         def default_url
           "rails.png"
         end
  
  
      end
  </code></pre>
  
  <p>carrierwave backgrounder file inside config/initializers/carrierwave_backgrounder.rb</p>
  
  <pre><code>            CarrierWave::Backgrounder.configure do |c|
               c.backend :delayed_job, queue: :carrierwave 
              end
  </code></pre>
  
  <p>Post model</p>
  
  <pre><code>        class Post &lt; ActiveRecord::Base
            attr_accessible :description , :avatar, :remote_avatar_url
            mount_uploader :avatar,   AvatarUploader
            process_in_background :avatar
            validates_presence_of :description
          end
  </code></pre>
  
  <p>Post controller action</p>
  
  <pre><code>        def create
            @post = Post.new(params[:post])
            respond_to do |format|
           if @post.save
             format.html { redirect_to @post, notice: 'Post was successfully created.' }
             format.json { render json: @post, status: :created, location: @post }
           else
             format.html { render action: "new" }
             format.json { render json: @post.errors, status: :unprocessable_entity }
           end
        end
      end
  </code></pre>
  
  <p>and here is my view</p>
  
  <pre><code>        &lt;%= form_for(@post) do |f| %&gt;
            &lt;% if @post.errors.any? %&gt;
            &lt;div id="error_explanation"&gt;
            &lt;h2&gt;&lt;%= pluralize(@post.errors.count, "error") %&gt; prohibited this post from      being saved:&lt;/h2&gt;
  
           &lt;ul&gt;
           &lt;% @post.errors.full_messages.each do |msg| %&gt;
           &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
           &lt;% end %&gt;
           &lt;/ul&gt;
          &lt;/div&gt;
         &lt;% end %&gt;
  
        &lt;div class="field"&gt;
         &lt;%= f.label :description %&gt;&lt;br /&gt;
         &lt;%= f.text_area :description %&gt;
        &lt;/div&gt;
        &lt;div class="field"&gt;
         &lt;%= f.file_field :avatar %&gt;
        &lt;/div&gt;
          &lt;div class="actions"&gt;
          &lt;%= f.submit %&gt;
        &lt;/div&gt;
       &lt;% end %&gt;
  </code></pre>